How can I assert my Ajax request and test the JSON output from Ruby on Rails functional tests?
Also for short JSON responses you can simply match a string of the JSON to @response.body. This prevents having to rely on yet another gem.
assert_equal '{"total_votes":1}', @response.body