[rspec-users] response.should have_text leads to undefined method `has_text?'

turkan kai.schlamp at googlemail.com
Thu Sep 30 16:50:36 EDT 2010

One of my controllers directly renders some JSON output that I would
like to test with RSpec. For that I use 'response.should
have_text("foobar")' in my spec file, but that leads to a

Failure/Error: response.should have_text("enim")
undefined method `has_text?' for #<ActionController::TestResponse:

I read here somewhere that webrat should be in the Gemfile, but that
also did not solve the problem.

Best regards,

More information about the rspec-users mailing list