Advertisement
saasbook

Untitled

Feb 16th, 2012
28,720
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.34 KB | None | 0 0
  1. Feature: search for movies by director
  2.  
  3.   As a movie buff
  4.   So that I can find movies with my favorite director
  5.   I want to include and serach on director information in movies I enter
  6.  
  7. Background: movies in database
  8.  
  9.   Given the following movies exist:
  10.   | title        | rating | director     | release_date |
  11.   | Star Wars    | PG     | George Lucas |   1977-05-25 |
  12.   | Blade Runner | PG     | Ridley Scott |   1982-06-25 |
  13.   | Alien        | R      |              |   1979-05-25 |
  14.   | THX-1138     | R      | George Lucas |   1971-03-11 |
  15.  
  16. Scenario: add director to existing movie
  17.   When I go to the edit page for "Alien"
  18.   And  I fill in "Director" with "Ridley Scott"
  19.   And  I press "Update Movie Info"
  20.   Then the director of "Alien" should be "Ridley Scott"
  21.  
  22. Scenario: find movie with same director
  23.   Given I am on the details page for "Star Wars"
  24.   When  I follow "Find Movies With Same Director"
  25.   Then  I should be on the Similar Movies page for "Star Wars"
  26.   And   I should see "THX-1138"
  27.   But   I should not see "Blade Runner"
  28.  
  29. Scenario: can't find similar movies if we don't know director (sad path)
  30.   Given I am on the details page for "Alien"
  31.   Then  I should not see "Ridley Scott"
  32.   When  I follow "Find Movies With Same Director"
  33.   Then  I should be on the home page
  34.   And   I should see "'Alien' has no director info"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement