diff --git a/features/step_definitions/movie_steps.rb b/features/step_definitions/movie_steps.rb index e8bc1eecb..8e67bdb54 100644 --- a/features/step_definitions/movie_steps.rb +++ b/features/step_definitions/movie_steps.rb @@ -10,9 +10,19 @@ # Make sure that one string (regexp) occurs before or after another one # on the same page -Then "I should see (.*) (before|after) (.*)" do |e1, order, e2| +Then /I should see "(.*)" (before|after) "(.*)"/ do |e1, order, e2| # assign a variable 'regex' here that creates a regular expression # to match the page content against, to make sure that e1 occurs # before or after e2 as specified in the step. page.content.should match(regex) end + +# Make it easier to express checking or unchecking several boxes at once +# "When I uncheck the following ratings: PG, G, R" +# "When I check the following ratings: G" + +When /I (un)?check the following ratings: (.*)/ do |uncheck, rating_list| + # HINT: use String#split to split up the rating_list, then + # iterate over the ratings and reuse the "When I check..." or + # "When I uncheck..." steps in lines 89-95 of web_steps.rb +end