In the controller spec, I can set http accept header like this:
request.accept = \"application/json\"
but in the request spec, \"request\"
I used this in Test::Unit:
@request.env['HTTP_ACCEPT'] = "*/*, application/youtube-client" get :index