Reputation: 83
I am trying to test my application with cucumber, capybara, capybara-webkit, spork and rspec and I am experiencing an error.
page.hast_text?("whatever")
passes every time no matter what i pass to the function.
Any Idea how to fix this?
Upvotes: 1
Views: 190
Reputation: 15056
You should be doing the following with Capybara:
page.should have_content("whatever")
Or
assert page.has_content?("whatever")
Upvotes: 3