Advertisement
Guest User

sort_movie_list.feature | SaaS | HW3 | BDD & Cucumber

a guest
Mar 18th, 2012
2,044
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.44 KB | None | 0 0
  1. Feature: display list of movies sorted by different criteria
  2.  
  3.   As an avid moviegoer
  4.   So that I can quickly browse movies based on my preferences
  5.   I want to see movies sorted by title or release date
  6.  
  7. Background: movies have been added to database
  8.  
  9.   Given the following movies exist:
  10.   | title                   | rating | release_date |
  11.   | Aladdin                 | G      | 25-Nov-1992  |
  12.   | The Terminator          | R      | 26-Oct-1984  |
  13.   | When Harry Met Sally    | R      | 21-Jul-1989  |
  14.   | The Help                | PG-13  | 10-Aug-2011  |
  15.   | Chocolat                | PG-13  | 5-Jan-2001   |
  16.   | Amelie                  | R      | 25-Apr-2001  |
  17.   | 2001: A Space Odyssey   | G      | 6-Apr-1968   |
  18.   | The Incredibles         | PG     | 5-Nov-2004   |
  19.   | Raiders of the Lost Ark | PG     | 12-Jun-1981  |
  20.   | Chicken Run             | G      | 21-Jun-2000  |
  21.  
  22.   And I am on the RottenPotatoes home page
  23.  
  24. Scenario: sort movies alphabetically
  25.   Given I am on the RottenPotatoes home page
  26.   And I check the following ratings: G,PG,PG-13,R,NC-17
  27.   When I press "Refresh"
  28.   And I follow "title_header"
  29.   Then I should see "Amelie" before "Chocolat"
  30.  
  31. Scenario: sort movies in increasing order of release date
  32.   Given I am on the RottenPotatoes home page
  33.   And I check the following ratings: G,PG,PG-13,R,NC-17
  34.   When I press "Refresh"
  35.   And I follow "release_date_header"
  36.   Then I should see "Chocolat" before "Amelie"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement