Failure: Expected 0 to be >= 1 on ruby on rails
The issue is that there is no html matching "Help | Ruby on Rails Tutorial Sample App"
.
if you look at the definition of assert_select
, it accepts :count
as (optional) argument. If the count
is not specified, it sets the minimum occurrence of the html
to 1. This is why the error you are getting is Expected 0 to be >= 1.
. In your case there were 0 matches where the test expected at least 1 match.