From 4873da64482f9afa03de2bf393a77120ee2b09b7 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Fri, 2 Jan 2015 16:00:53 -0600 Subject: [PATCH] * make test not break randomly --- web/spec/features/in_session_spec.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/spec/features/in_session_spec.rb b/web/spec/features/in_session_spec.rb index f2c5def63..0d4215320 100644 --- a/web/spec/features/in_session_spec.rb +++ b/web/spec/features/in_session_spec.rb @@ -75,12 +75,10 @@ describe "In a Session", :js => true, :type => :feature, :capybara_feature => tr it "a user can change the genre and the Find Session screen will be updated" do create_session(creator: user) in_client(finder) { sign_in_poltergeist finder } - 2.times do - in_client(user) do - @new_genre = change_session_genre #randomizes it - end + # this used to randomly select genres, but it breaks if the genre contains the name work due to multiple matching genres + ['Electronic', 'Religious'].each do |new_genre| in_client(finder) do - find_session_contains?(@new_genre) + find_session_contains?(new_genre) end end end