From 97d514dd65ec572ab4a87cc6104d21bc2347c1ab Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Sun, 4 Sep 2011 21:50:52 -0700 Subject: [PATCH] Make connecting users in cucumber more deterministic. Should cut down on spurious failures in comment spec. --- features/comments.feature | 2 +- features/step_definitions/user_steps.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/features/comments.feature b/features/comments.feature index e3942f0cc..ea5e67c1c 100644 --- a/features/comments.feature +++ b/features/comments.feature @@ -53,7 +53,7 @@ Feature: commenting And I wait for 2 seconds 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" Then I should see "Look at this dog" Then the first comment field should be closed diff --git a/features/step_definitions/user_steps.rb b/features/step_definitions/user_steps.rb index b488ec61c..b759ce4cb 100644 --- a/features/step_definitions/user_steps.rb +++ b/features/step_definitions/user_steps.rb @@ -76,7 +76,7 @@ end Given /^a user with email "([^"]*)" is connected with "([^"]*)"$/ do |arg1, arg2| user1 = User.where(:email => arg1).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 Given /^a user with username "([^"]*)" is connected with "([^"]*)"$/ do |arg1, arg2|