[rspec-users] Stub an instance method for every new instance of a class

Ashley Moran ashley.moran at patchspace.co.uk
Tue Apr 1 03:50:31 EDT 2008


On 01/04/2008, Jed Hurt <jed.hurt at gmail.com> wrote:
>
> Is there an easy way to stub an instance method for every new instance of
> a given class? I suppose I could just redefine the method, but I'm wondering
> if the RSpec mocking framework has this built in.


Hi Jed

I hate it when other people ask this, but I can't help :)  How come you need
to do this?  I've always wondered what the use case for this "mocking"
strategy is

Ashley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080401/38d11038/attachment-0001.html 


More information about the rspec-users mailing list