[rspec-users] Rspec - stubbing same class multiple times with different co
Lori M Olson
loriolson at me.com
Wed Jul 23 00:06:58 EDT 2008
Have you tried using should_receive instead of stub! ?
Sent from my iPhone
On 22-Jul-08, at 8:37 PM, Ry An <lists at ruby-forum.com> wrote:
> Im having a hard time with a rspec controller test im writting, I need
> to stub! the User.find call twice once to return the owning user and
> once to return the viewing user. however when I attempt
> the second call returns
> undefined local variable or method `find' for #<Class:0x7faf42964d00>
> I've managed to replicate the behavior outside of this specific test
> I know the code works as I can test it manually.
> Any ideas as to why this is not working? or better still how to get it
> Thanks for the help in advance
> Posted via http://www.ruby-forum.com/.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users