nhrn_a
Last Updated: July 12, 2016
·
490
· tmartin314
Fisheye

Set user agent for rspec controller tests

In controller specs, you can just modify the Rack environment before making your request:

request.env['HTTP_USER_AGENT'] = 'Googlebot'
get :index
Say Thanks
Respond