Skip to content

Instantly share code, notes, and snippets.

@camelpunch
Created March 26, 2011 12:43
Show Gist options
  • Select an option

  • Save camelpunch/888252 to your computer and use it in GitHub Desktop.

Select an option

Save camelpunch/888252 to your computer and use it in GitHub Desktop.
Then /^I should see ([^"]+)$/ do |thing|
page.should have_css(selector_for(thing))
end
When /^(.*) within ([^:"]+)$/ do |step, parent|
with_scope(parent) { When step }
end
when 'the cart summary'
'#cart_summary'
Ambiguous match of "I should see the 1st design within the cart summary":
features/step_definitions/navigation_steps.rb:69:in `/^I should see ([^"]+)$/'
features/step_definitions/web_steps.rb:21:in `/^(.*) within ([^:"]+)$/'
You can run again with --guess to make Cucumber be more smart about it
(Cucumber::Ambiguous)
Then /^I should see ((?:(?!within|").)+)$/ do |thing|
page.should have_css(selector_for(thing))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment