I’m using the account_location plugin to let users create accounts
(user.site.com)
in routes.rb I have:
map.connect ‘’, :controller => “site”, :conditions => { :subdomain =>
‘www’ }
map.connect ‘’, :controller => “accounts”
so I can have a public facing www.site.com through site_controller and
have the accounts_controller handle everything else.
In my functional tests for the site controller for example, if I do
something simple like
get :index
the test tells me it’s been routed to the accounts controller. This must
be because the test doesn’t know the subdomain perhaps. So I try
get ‘www.site.com’ or get :index, :subdomain => ‘www’
and have the same results.
How can you get functional tests to recognize the subdomain? I’m stumped
on this one.