Hi.
Now i writing tests via Rspec and appeared a question.

Question is how can i create few connections, at least two connections for 
testing online changes at page ? It's only online chat.

At this time a have only 

let(:user) { FactoryGirl.create(:user) }

before do
 visit signin_path
 fill_in "Name",    with: user.name
 fill_in "Password", with: user.password
 click_button "Sign in"
end

But i looking for something like this:
        
let(:first_user) { FactoryGirl.create(:user) }
        let(:second_user) { FactoryGirl.create(:user) }

        at connection: :first_connection do 
     before do
    visit signin_path
    fill_in "Name",    with: first_user.name
    fill_in "Password", with: first_user.password
    click_button "Sign in"
  end
       end


       at connection: :second_connection do
     before do
    visit signin_path
    fill_in "Name",    with: second_user.name
    fill_in "Password", with: second_user.password
    click_button "Sign in"
  end
      end
   
      # manipulate with connections

Thanks.
     


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/0b4c660b-b1c1-4cce-8828-4c1342dd2c95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to