lib/mechanical-cuke/web_steps.rb in mechanical-cuke-0.4.2 vs lib/mechanical-cuke/web_steps.rb in mechanical-cuke-0.4.3

- old
+ new

@@ -102,36 +102,40 @@ end end Then /^the "([^\"]*)" field should contain "([^\"]*)"$/ do |field, value| f = find_field(field) + raise "Can't find field \"#{field}\"" if f.nil? if defined?(Spec::Rails::Matchers) f.should == field else assert_equal value, f.value end end Then /^the "([^\"]*)" field should not contain "([^\"]*)"$/ do |field, value| f = find_field(field) + raise "Can't find field \"#{field}\"" if f.nil? if defined?(Spec::Rails::Matchers) f.should_not == value else assert_not_equal value, f.value end end Then /^the "([^\"]*)" checkbox should be checked$/ do |label| cb = find_checkbox(label) + raise "Can't find check box \"#{label}\"" if cb.nil? if defined?(Spec::Rails::Matchers) cb.checked.should be true else assert cb.checked end end Then /^the "([^\"]*)" checkbox should not be checked$/ do |label| cb = find_checkbox(label) + raise "Can't find check box \"#{label}\"" if cb.nil? if defined?(Spec::Rails::Matchers) cb.checked.should be true else assert !cb.checked end