I have these test steps. app_host is pointing to “google.com”.
Given /^I am on google\.com$/ do
visit("/")
end
Then /^I should see something$/ do
has_css?('a#something')
end
Regardless of what I have in the 2nd step, test is passing. I am just wondering if I am missing something here.
Cucumber steps will only fail if an assertion fails. They do not fail based on if the last line is true or false.
To use
has_css?in an assertion you can do one of the following: