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
(http://rspec.rubyforge.org/rdoc-rails/classes/Spec/Rails/Matchers.html#M000014).
You can use omglolsrofls_url instead. If you think this should behave
differently, feel free to submit a feature request:
http://rubyforge.org/tracker/?group_id=797
Cheers (and welcome),
David
>
> Oh... and that''s an arbitrary controller name if you were
wondering ;)
> Thanks !
> => Dylan
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>