I have a Rails 3.0.7 application. In the functional test I have following code. I am not using rspec or anything. This is plain vanilla functional test that comes with rails.
assert_response :success
Above assertion is passing. However I need to assert on the full content that is returned as the body of the response. How do I access the response body?
You can access the response body in a functional test via:
Often, in this style of testing, you really want to use the method:
A nice way to check out the assert_select API is via the cheat gem: