Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. # /rottenpotatoes/features/step_definitions/director_steps.rb
  2. Given(/^the following movies exist:$/) do |movies_table|
  3. movies_table.hashes.each do |movie|
  4. # each returned element will be a hash whose key is the table header.
  5. Movie.create(movie)
  6. end
  7. end
  8.  
  9. Then(/^the director of "([^"]*)" should be "([^"]*)"$/) do |movie, director|
  10. expect(Movie.find_by_title(movie).director).to eq director #RSpec assertion
  11. end
  12.  
  13. Then(/^I should see "([^"]*)" before "([^"]*)"$/) do |arg1, arg2|
  14. /#{arg1}.*#{arg2}/ =~ page.body
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement