Skip to content

Instantly share code, notes, and snippets.

@emk
Created April 29, 2009 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save emk/104130 to your computer and use it in GitHub Desktop.
Save emk/104130 to your computer and use it in GitHub Desktop.
Fill in multiline forms with Cucumber and Webrat
# Fill in multiple form fields using a table. Use it as follows:
#
# When I fill in the fields
# | Field 1 | Value 1 |
# | Field 2 | Value 2 |
When /^I fill in the fields$/ do |table|
table.rows_hash.each {|field, value| fill_in field, :with => value }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment