Railsチュートリアル 9章9.30にて
rails test を実行するとエラーが発生します。
原因または、解決方法をご存知の方はいらっしゃいませんか?
エラー内容
Ruby
1ERROR["test_layout_links", SiteLayoutTest, 0.5454518830001689] 2 test_layout_links#SiteLayoutTest (0.55s) 3NoMethodError: NoMethodError: undefined method `full_title' for #<SiteLayoutTest:0x0000000006258c20> 4 test/integration/site_layout_test.rb:13:in `block in <class:SiteLayoutTest>' 5 6 24/24: [======================================================================================] 100% Time: 00:00:00, Time: 00:00:00 7 8Finished in 0.60812s 924 tests, 55 assertions, 0 failures, 1 errors, 0 skips
test/integration/site_layout_test.rb
ruby
1require 'test_helper' 2 3class SiteLayoutTest < ActionDispatch::IntegrationTest 4 5 test "layout links" do 6 get root_path 7 assert_template 'static_pages/home' 8 assert_select "a[href=?]", root_path, count: 2 9 assert_select "a[href=?]", help_path 10 assert_select "a[href=?]", about_path 11 assert_select "a[href=?]", contact_path 12 get contact_path 13 assert_select "title", full_title("Contact") 14 get signup_path 15 assert_select "title", full_title("Sign up") 16 end 17end
環境
Mac
Cloud9
回答1件
あなたの回答
tips
プレビュー