Using Rails.env is not the right approach here

All Cucumber stories now passing
This commit is contained in:
Eric Allen 2010-04-10 15:31:28 -04:00
parent 1e4d250a15
commit 05cbea50aa

View file

@ -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