Adding subdomains to a Rails application is an easy task today, but things can get a little trickier when testing is involved. For starters, you may only need to handle subdomains at the routing level, which is quite easy. But after the easy step some troubles may be awaiting for you. In our example we want to add an “admin” subdomain to a brand new app. We edit the file routes.rb as follows and w