0

I've noticed that when I run tests (using Rspec and spork, if that matters), my hostname is set to www.example.com. So if I do:

 visit sports_url

the test is actually going to www.example.com/sports.

This is a problem because I need to run some of the tests with selenium (to get javascript support). Also, I noticed my emails where being marked as coming from www.example.com.

What did I mess up? Why is the test environment running as example.com? Can I configure this somewhere? I would assume it should be programatic (depending on what port the test server starts up on).

Tyler DeWitt
  • 23,366
  • 38
  • 119
  • 196

1 Answers1

0

You can configure the test environment domain, then set up DNS to do what you need.

How do I change the default "www.example.com" domain for testing in rails?

Community
  • 1
  • 1
Tyler DeWitt
  • 23,366
  • 38
  • 119
  • 196