[rspec-users] redirect_to a relative path

Dylan Stamat dylans at gmail.com
Fri Jun 1 19:30:19 EDT 2007

In a controller spec, doing something like:
response.redirect_url.should == omglolsrofls_path

... fails, as so:
expected "/omglolrofls", got "http://test.host/omglolrofls" (using ==)

You can see that the http://test.host is prepended to the path.
My controller is indeed redirecting to the omglolrofls path, and not  
the url.
Is this expected ?

Oh... and that's an arbitrary controller name if you were wondering ;)
Thanks !

More information about the rspec-users mailing list