How do I spec rails3 routing constraints?
My Cucumber features pass whatever subdomain I pass in. Not sure where
or how to spec the subdomain. Any help would be appreciated.
I have something like the following:
Given I visit subdomain “www”
And I go to the new account page
describe AccountsController do
describe “GET new” do
it "should render new.html.haml" do response.should render_template(:new) end
constraints Promotional do
resource :account, :only => :new
request.subdomain.empty? || request.subdomain == “www”