Skip to content

Instantly share code, notes, and snippets.

@ajwinn
Created October 31, 2012 18:43
Show Gist options
  • Save ajwinn/3989011 to your computer and use it in GitHub Desktop.
Save ajwinn/3989011 to your computer and use it in GitHub Desktop.
Does Ruby understand tables?
# from the .feature
Given the following movies exist:
| title | rating | release_date |
| Aladdin | G | 25-Nov-1992 |
| The Terminator | R | 26-Oct-1984 |
# from the _steps.rb
Given /the following movies exist/ do |movies_table|
movies_table.hashes.each do |movie|
Movie.create!(movie)
end
#assert(Movie.all.length ==)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment