How can I assert my Ajax request and test the JSON output from Ruby on Rails functional tests?
Rails has JSON support built in:
def json_response
ActiveSupport::JSON.decode @response.body
end
No need for a plugin
Then you can do something like this:
assert_equal "Mike", json_response['name']