Simply Rails 2という本のチュートリアルの実行中にアプリを構築していますが、いくつかのテストに合格するのに問題があります。Rails Appで失敗したテスト
は、ここで私が受けてるエラーです:
1) Failure:
test_should_show_index(StoriesControllerTest)
[/Users/ryanclark/Projects/shovell/test/functional/stories_controller_test.rb:8:in `test_should_show_index'
/Users/ryanclark/.rvm/gems/ruby-1.8.6-p420/gems/activesupport-2.0.2/lib/active_support/testing/default.rb:7:in `run']:
<nil> expected to not be nil.
2) Failure:
test_should_show_navigation_menu(StoriesControllerTest)
[/Users/ryanclark/.rvm/gems/ruby-1.8.6-p420/gems/actionpack-2.0.2/lib/action_controller/assertions/selector_assertions.rb:297:in `assert_select'
/Users/ryanclark/Projects/shovell/test/functional/stories_controller_test.rb:44:in `test_should_show_navigation_menu'
/Users/ryanclark/.rvm/gems/ruby-1.8.6-p420/gems/activesupport-2.0.2/lib/active_support/testing/default.rb:7:in `run']:
Expected at least 2 elements matching "#navigation li", found 3.
<false> is not true.
3) Failure:
test_should_show_new_form(StoriesControllerTest)
[/Users/ryanclark/.rvm/gems/ruby-1.8.6-p420/gems/actionpack-2.0.2/lib/action_controller/assertions/selector_assertions.rb:297:in `assert_select'
/Users/ryanclark/Projects/shovell/test/functional/stories_controller_test.rb:18:in `test_should_show_new_form'
/Users/ryanclark/.rvm/gems/ruby-1.8.6-p420/gems/activesupport-2.0.2/lib/active_support/testing/default.rb:7:in `run']:
Expected at least 3 elements matching "form p", found 4.
<false> is not true.
マイプロジェクトがGithub上にあり、誰かが見て、私を助けてしまう場合、私は本当に少しの洞察力をいただければ幸いです。
また、私は詳細とコードを提供してくれるだけで、投稿を簡潔にしています。
ちょっと、ライアン、あなたの問題を解決しましたか?私の答えは有益でしたか? –
こんにちはアレックス、私はあなたの答えを読んで、すべてが理にかなっています。本のコードがオフであるか、これらのものがそこにあるかどうかはわかりません。私はまだコードを通過する時間がなかったが、間違いなく私が知るものをあなたに知らせるだろう。私のコードと本の両方をチェックしたい。助けてくれてありがとう! –