[rspec-users] redirect_to a relative path
dchelimsky at gmail.com
Sat Jun 2 09:25:19 EDT 2007
On 6/1/07, Dylan Stamat <dylans at gmail.com> wrote:
> 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 ?
That's how it's doc'd
You can use omglolsrofls_url instead. If you think this should behave
differently, feel free to submit a feature request:
Cheers (and welcome),
> Oh... and that's an arbitrary controller name if you were wondering ;)
> Thanks !
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users