I have the following code in my controller:
format.json { render :json => { :flashcard => @flashcard, :lesson => @lesson,
You could parse the response body like this:
parsed_body = JSON.parse(response.body)
Then you can make your assertions against that parsed content.
parsed_body["foo"].should == "bar"