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

- old
+ new

@@ -11,10 +11,12 @@ raise "Can't find button \"#{value}\"" if button.nil? form.click_button(button) end When /^(?:|I )follow "([^\"]*)"$/ do |link| - current_page.link_with(:text => link).click + l = current_page.link_with(:text => link) + raise "Can't find link \"#{link}\"" if l.nil? + l.click end When /^(?:|I )fill in "([^\"]*)" with "([^\"]*)"$/ do |field, value| f = find_field(field) raise "Can't find field \"#{field}\"" if f.nil?