From 05cbea50aa7007295bd59ab0ba5f8b64a0ff8ddb Mon Sep 17 00:00:00 2001 From: Eric Allen Date: Sat, 10 Apr 2010 15:31:28 -0400 Subject: [PATCH] Using Rails.env is not the right approach here All Cucumber stories now passing --- features/step_definitions/generic_steps.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/step_definitions/generic_steps.rb b/features/step_definitions/generic_steps.rb index 5e1b684f..506bb493 100644 --- a/features/step_definitions/generic_steps.rb +++ b/features/step_definitions/generic_steps.rb @@ -3,7 +3,7 @@ Then /the badge should show (.*)/ do |number| badge = -1 xpath= "//span[@id='badge_count']" - if Rails.env == 'selenium' + if response.respond_to? :selenium response.should have_xpath(xpath) badge = response.selenium.get_text("xpath=#{xpath}").to_i else