Skip to content

Instantly share code, notes, and snippets.

@joelturnbull
Created September 11, 2012 13:44
Show Gist options
  • Save joelturnbull/3698584 to your computer and use it in GitHub Desktop.
Save joelturnbull/3698584 to your computer and use it in GitHub Desktop.
snippets for cucumber regex article
When I click "Edit"
When /^I click "(.*?)"$/ do |arg1|
pending # express the regexp above with the code you wish you had
end
When I click "Edit" for "Jack"
no link or button 'Run" for "Bar' found (Capybara::ElementNotFound)
Ambiguous match of "I click "Edit" for "Jack"":
features/step_definitions/running_stuff_steps.rb:12:in `/^I click "(.*?)"$/'
features/step_definitions/running_stuff_steps.rb:16:in `/^I click "(.*?)" for "(.*?)"$/'
/^I click "(.*?)"$/
/^I click "([^"]*)"$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment