My Rails application uses the SERVER_NAME environment variable to
decide how to display some of the web pages.
I want to do integration testing with this application but I do not
see how to force the request object’s environment variable SERVER_NAME
to a particular value.
I would like to do something like this in the integration test file
request.env[“SERVER_NAME”] = “www.example.com”
This does not work. Any suggestions?