Skip to content

Instantly share code, notes, and snippets.

@pacoguzman
Created July 25, 2009 07:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pacoguzman/154730 to your computer and use it in GitHub Desktop.
Save pacoguzman/154730 to your computer and use it in GitHub Desktop.
Then /^I should see a form for "(.+)" containing (.+) fields$/ do |object, methods|
fields = methods.scan(/(\w+)(?:,|\sand\s|\s)?/).flatten
response.should have_selector(:form) do |form|
fields.each do |field|
form.to_s.should have_selector("input", :id => "#{object}_#{field}")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment