I got such output during bundle exec rake test: Someone please explain why am I not getting the intended rails test result(
F
Failure:
StaticPagesControllerTest#test_should_get_home [/Users/ivansharov/RubymineProjects/sample_app/test/controllers/static_pages_controller_test.rb:11]:
<Home | > expected but was
<Home | Ruby on Rails Tutorial Sample App>..
Expected 0 to be >= 1.
rails test test/controllers/static_pages_controller_test.rb:8
F
Failure:
StaticPagesControllerTest#test_shoud_get_contact [/Users/ivansharov/RubymineProjects/sample_app/test/controllers/static_pages_controller_test.rb:29]:
<Contact | > expected but was
<Contact | Ruby on Rails Tutorial Sample App>..
Expected 0 to be >= 1.
rails test test/controllers/static_pages_controller_test.rb:26
F
Failure:
StaticPagesControllerTest#test_shoud_get_about [/Users/ivansharov/RubymineProjects/sample_app/test/controllers/static_pages_controller_test.rb:23]:
<About | > expected but was
<About | | Ruby on Rails Tutorial Sample App>..
Expected 0 to be >= 1.
rails test test/controllers/static_pages_controller_test.rb:20
F
Failure:
StaticPagesControllerTest#test_should_get_help [/Users/ivansharov/RubymineProjects/sample_app/test/controllers/static_pages_controller_test.rb:17]:
<Help | > expected but was
<Help | Ruby on Rails Tutorial Sample App>..
Expected 0 to be >= 1.
It is my static_pages_controller_test.rb file:
require "test_helper"
def setup @base_title = "Ruby on Rails Tutorial Sample App" end
class StaticPagesControllerTest < ActionDispatch::IntegrationTest test "should get home" do get static_pages_home_url assert_response :success assert_select "title", "Home | #{@base_title}" end
test "should get help" do get static_pages_help_url assert_response :success assert_select "title", "Help | #{@base_title}" end
test "shoud get about" do get static_pages_about_url assert_response :success assert_select "title", "About | #{@base_title}" end
test "shoud get contact" do get static_pages_contact_url assert_response :success assert_select "title","Contact | #{@base_title}" end end
Aucun commentaire:
Enregistrer un commentaire