0

I have a Rails 3.2 app using a naked domain (e.g. doma.in) and I'd like to redirect all subdomains (including root) to www.doma.in.

The gem rack-www does this nicely. However, now all of my integration tests are breaking. I'm using Capybara-webkit and Turnip.

Help! Thanks in advance.

adarsh
  • 396
  • 3
  • 12

2 Answers2

0

Here's a post on testing sub domains. It may not be the exact solution but it shows how to set the app host etc

http://blog.jamesalmond.com/testing-subdomains-using-capybara/

Rimian
  • 36,864
  • 16
  • 117
  • 117
0

I ended up just setting the redirect in the config/environments/staging||production.rb files and my tests passed just fine.

adarsh
  • 396
  • 3
  • 12