Sep 15, 2011 rails · rspec · subdomain

Set subdomain in Rails 3 request specs

Every request spec runs inside an Integration::Session hence just add:

before { host! "mysubdomain.#{host}" }

This of course works for Rails3+Rspec2.