I'm having trouble getting my rspec routing tests working with subdomain restriction.
In particular, I have a route
constraints :subdomain => "api" do resources :sign_ups, :only => [:create] end
and (among other things) a test
it "does allow creation of sign ups" do {:post => "/sign_ups"}.should route_to( :controller => "sign_ups", :action => "create", ) end
If I remove the subdomain restriction that this test passes, but with it it fails. I have to tell rspec to use a subdomain, but I donβt understand how
TIA
Andy
ruby ruby-on-rails rspec rspec-rails
Andy
source share