lib/spreewald/web_steps.rb in spreewald-1.1.0 vs lib/spreewald/web_steps.rb in spreewald-1.1.1

- old
+ new

@@ -1,8 +1,8 @@ # coding: UTF-8 -# Most of cucumber-rails' original web steps plus a few of our own. +# Most of cucumber-rails' original web steps plus a few of our own. # # Note that cucumber-rails deprecated all its steps quite a while ago with the following # deprecation notice. Decide for yourself whether you want to use them: # # > This file was generated by Cucumber-Rails and is only here to get you a head start @@ -265,22 +265,22 @@ # nodoc Then /^the "([^"]*)" checkbox(?: within (.*))? should be checked$/ do |label, parent| patiently do with_scope(parent) do - field_checked = find_field(label)['checked'] - field_checked.should == true + field = find_field(label) + field.should be_checked end end end # nodoc Then /^the "([^"]*)" checkbox(?: within (.*))? should not be checked$/ do |label, parent| patiently do with_scope(parent) do - field_checked = find_field(label)['checked'] - field_checked.should == false + field = find_field(label) + field.should_not be_checked end end end Then /^the radio button "([^"]*)" should( not)? be (?:checked|selected)$/ do |field, negate| @@ -502,10 +502,10 @@ # Use this step to check external links. # # Example: # # Then "Sponsor" should link to "http://makandra.com" -# +# Then /^"([^"]*)" should link to "([^"]*)"$/ do |link_label, target| patiently do link = find_link(link_label) link[:href].should =~ /#{Regexp.escape target}$/ end