David Chelimsky wrote:
> retrieve_user, the real method, sets an instance variable that other
> methods expect to be set rather than returning a value. When this is
> stubbed with a *return value* of the user, the instance variable never
> gets set inside the controller.
> 
> I'd add a current_user method that returns @current_user, and then
> stub *that* in the code examples:

 Hi David,
I understand your response now that its pointed out what is happening 
between controller and rspec, however, this means changing my code to 
test it.  This strikes me as backward. Isn't there another way to get 
the @current_user "set" for use in the controller?

BTW - the actual code runs fine.

HR


-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to