Skip to content

Instantly share code, notes, and snippets.

@norbajunior
Forked from emk/form_steps.rb
Created July 28, 2016 10:32
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 norbajunior/0b634972d0b4b5990c88fd4922d0e05c to your computer and use it in GitHub Desktop.
Save norbajunior/0b634972d0b4b5990c88fd4922d0e05c 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