I have a show method i’m testing, that returns some data in json format.
My tests show that something is being returned, but i want to get at it
and test the contents. I can’t work out how to do this, can anyone
help?
def test_show_gets_data_ok
get :show, :token => @given_token
assert_response #want to say something like #some_json = a_hash.to_json #assert_equal(response, some_json)
end
In other words, how do i set an object equal to the response?