Hi *, is someone using rspec 2 and rails 3 for testing subdomains ? How
do I test for example in a route spec tis route ?
match ‘profile’, :to => ‘users#profile’, :constraints => { :subdomain
=> /.+/ }
TIA,
ngw
Hi *, is someone using rspec 2 and rails 3 for testing subdomains ? How
do I test for example in a route spec tis route ?
match ‘profile’, :to => ‘users#profile’, :constraints => { :subdomain
=> /.+/ }
TIA,
ngw
On Jul 27, 2010, at 6:40 PM, Nicholas W. wrote:
Hi *, is someone using rspec 2 and rails 3 for testing subdomains ? How do I test for example in a route spec tis route ?
match ‘profile’, :to => ‘users#profile’, :constraints => { :subdomain => /.+/ }
it “routes /profile to UsersController#profile for slug” do
{ :get => “profile” }.should route_to(
:controller => :users, :action => :profile, :permalink => ‘test’ )
end
This fails with
undefined method `subdomain’ for #Rack::Request:0x102fd16e8
I’m not able to set the host, host! doesn’t work, or I’m using it in the
wrong way.
Someone has any idea ?
ngw
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs