nhrn_a
Last Updated: July 14, 2018
·
982
· 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