lib/spreewald/web_steps.rb in spreewald-1.2.0 vs lib/spreewald/web_steps.rb in spreewald-1.2.1

- old
+ new

@@ -262,25 +262,15 @@ classes.should_not include('error') end end # nodoc -Then /^the "([^"]*)" checkbox(?: within (.*))? should be checked$/ do |label, parent| - patiently do - with_scope(parent) do - field = find_field(label) - field.should be_checked - end - end -end +Then /^the "([^"]*)" checkbox should( not)? be checked$/ do |label, negate| + expectation = negate ? :should_not : :should -# nodoc -Then /^the "([^"]*)" checkbox(?: within (.*))? should not be checked$/ do |label, parent| patiently do - with_scope(parent) do - field = find_field(label) - field.should_not be_checked - end + field = find_field(label) + field.send expectation, be_checked end end Then /^the radio button "([^"]*)" should( not)? be (?:checked|selected)$/ do |field, negate| patiently do