Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # /rottenpotatoes/features/step_definitions/director_steps.rb
- Given(/^the following movies exist:$/) do |movies_table|
- movies_table.hashes.each do |movie|
- # each returned element will be a hash whose key is the table header.
- Movie.create(movie)
- end
- end
- Then(/^the director of "([^"]*)" should be "([^"]*)"$/) do |movie, director|
- expect(Movie.find_by_title(movie).director).to eq director #RSpec assertion
- end
- Then(/^I should see "([^"]*)" before "([^"]*)"$/) do |arg1, arg2|
- /#{arg1}.*#{arg2}/ =~ page.body
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement