Failure: Expected 0 to be >= 1 on ruby on rails -


i'm doing hartle tutorial , see failure every time run rake test see failure:

  1) failure: staticpagescontrollertest#test_should_get_help [.../sample_app/test/controllers/static_pages_controller_test.rb:14]: <help | ruby on rails tutorial sample app> expected <ruby on rails tutorial sample app>.. expected 0 >= 1. 

what mean? , how can solve it? static_pages_controller_test.rb file.

require 'test_helper'  class staticpagescontrollertest < actioncontroller::testcase    test "should home"     :home     assert_response :success     assert_select "title", "ruby on rails tutorial sample app"   end    test "should help"     :help     assert_response :success     assert_select "title", "help | ruby on rails tutorial sample app"   end    test "should about"     :about     assert_response :success     assert_select "title", "about | ruby on rails tutorial sample app"   end    test "should contact"     :contact     assert_response :success     assert_select "title", "contact | ruby on rails tutorial sample app"   end end 

and here line 14.

assert_select "title", "help | ruby on rails tutorial sample app" 

the issue there no html matching "help | ruby on rails tutorial sample app".

if @ definition of assert_select, accepts :count (optional) argument. if count not specified, sets minimum occurrence of html 1. why error getting expected 0 >= 1.. in case there 0 matches test expected @ least 1 match.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -