Make connecting users in cucumber more deterministic. Should cut down on spurious failures in comment spec.

This commit is contained in:
Sarah Mei 2011-09-04 21:50:52 -07:00
parent c678f4732c
commit 97d514dd65
2 changed files with 2 additions and 2 deletions

View file

@ -53,7 +53,7 @@ Feature: commenting
And I wait for 2 seconds And I wait for 2 seconds
Then I should not see "is that a poodle?" Then I should not see "is that a poodle?"
Scenario: expand the comment form Scenario: expand the comment form in the main stream and an individual aspect stream
When I sign in as "bob@bob.bob" When I sign in as "bob@bob.bob"
Then I should see "Look at this dog" Then I should see "Look at this dog"
Then the first comment field should be closed Then the first comment field should be closed

View file

@ -76,7 +76,7 @@ end
Given /^a user with email "([^"]*)" is connected with "([^"]*)"$/ do |arg1, arg2| Given /^a user with email "([^"]*)" is connected with "([^"]*)"$/ do |arg1, arg2|
user1 = User.where(:email => arg1).first user1 = User.where(:email => arg1).first
user2 = User.where(:email => arg2).first user2 = User.where(:email => arg2).first
connect_users(user1, user1.aspects.first, user2, user2.aspects.first) connect_users(user1, user1.aspects.where(:name => "Besties").first, user2, user2.aspects.where(:name => "Besties").first)
end end
Given /^a user with username "([^"]*)" is connected with "([^"]*)"$/ do |arg1, arg2| Given /^a user with username "([^"]*)" is connected with "([^"]*)"$/ do |arg1, arg2|