goodkat
goodkat

Reputation: 83

Capybara querying doesn't work

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?

env.rb

Upvotes: 1

Views: 190

Answers (1)

Sean Hill
Sean Hill

Reputation: 15056

You should be doing the following with Capybara:

page.should have_content("whatever")

Or

assert page.has_content?("whatever")

Upvotes: 3

Related Questions