[rspec-users] stubbing gets undone?
lists at ruby-forum.com
Wed Feb 16 14:37:45 EST 2011
Scott Taylor wrote in post #981963:
> Is #unstub being called at any point?
No, but I think I see what's happening: I'm stubbing a particular
(in-memory) instance of an AR. Later on in my code, the same AR is
fetched, but now has a different in-memory address, and thus isn't
subject to stubbing. (Is my analysis plausible?)
So my new question is: can I stub Premise#lookup_stuff_on_the_web for
all objects? (I could just set up WebMock to return a specific
response, but it's a complex data structure and it would be much cleaner
to stub Premise#lookup_stuff_on_the_web instead.)
Posted via http://www.ruby-forum.com/.
More information about the rspec-users