I am doing functional tests for my controllers with Rspec. I have set my default response format in my router to JSON, so every request without a suffix will return JSON.
before :each do request.env["HTTP_ACCEPT"] = 'application/json' end