シナリオ: では、PG と R の評価が表示された映画を見る必要があります。
ステップの定義: 次に、/^レーティング (.*) が表示された映画を見る必要があります$/ do |rating| を実行します page.should have_content(Movie.find_all_by_ratings) end
キュウリ:
DEPRECATION WARNING: Calling dynamic finder with less number of arguments than the number of attributes in method name is deprecated and will raise an ArguementError in the next version of Rails. Please passing `nil' to the argument you want it to be nil.
(called from block (2 levels) in <top (required)> at /home/saasbook/hw3_rottenpotatoes/features/step_definitions/movie_steps.rb:44)
Then I should see movies with ratings PG and R displayed # features/step_definitions/movie_steps.rb:42
expected there to be content "[]" in "Rotten Potatoes!\nRotten Potatoes!\n\nAll Movies\n\n\n\nInclude:\nG\n\nPG\n\nPG-13\n\nNC-17\n\nR\n\n\nMovie Title\nRating\nRelease Date\nMore Info\nThe Terminator\nR\n1984-10-26 00:00:00 UTC\nMore about The Terminator\nWhen Harry Met Sally\nR\n1989-07-21 00:00:00 UTC\nMore about When Harry Met Sally\nAmelie\nR\n2001-04-25 00:00:00 UTC\nMore about Amelie\nThe Incredibles\nPG\n2004-11-05 00:00:00 UTC\nMore about The Incredibles\nRaiders of the Lost Ark\nPG\n1981-06-12 00:00:00 UTC\nMore about Raiders of the Lost Ark\nAdd new movie\n\n\n" (RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/movie_steps.rb:44:in `block (2 levels) in <top (required)>'
./features/step_definitions/movie_steps.rb:43:in `each'
./features/step_definitions/movie_steps.rb:43:in `/^I should see movies with ratings (.*) displayed$/'
features/filter_movie_list.feature:34:in `Then I should see movies with ratings PG and R displayed'
ここで間違いを修正するのを手伝ってください。
改善されたフォーマットについてNSSに感謝します。