I noticed that when I run tests (using Rspec and spork, if that matters), my hostname is set to www.example.com. Therefore, if I do this:
visit sports_url
the test will indeed go to www.example.com/sports.
This is a problem because I need to run some tests with selenium (to get javascript support). In addition, I noticed that my letters are sent from www.example.com.
What have I messed up? Why does the test environment work like example.com? Can I customize this somewhere? I assume that it should be software (depending on which port starts the test server).
source share