enable named urls before response
Reported by linoj | December 20th, 2007 @ 07:51 AM
It seems that named urls are available to the controller specs only after you've executed the controller action and there's a response. I would like to access them before.
For example, I keep encountering situations where want to do
controller.should_receive(:redirect_back_or_default).with( user_home_url )
do_it
rather than
do_it
response.should redirect_to( user_home_url)
why? because my controller spec doesn't/shouldn't need to verify that the redirect_back_or_default method works, only that it gets called.
If I use controller.user_home_url before the action, I get protected method `user_home_url' called
Comments and changes to this ticket
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Behaviour Driven Development for Ruby.
