[rspec-users] Stubs and Object Constructor

andyl akleak at gmail.com
Mon Mar 21 00:38:20 EDT 2011


OK - I got this working using mocha and the 'any_instance' method.  

A gist with working examples is here: https://gist.github.com/879029

It looks like rspec mocks had an 'any_instance' method, but it was removed 
because it promoted 'bad practice'.

I'm curious to understand how 'any_instance' promotes bad practice.  I found 
it useful in my situation, to stub out slow network code that crushed my 
test performance.

- Andy  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110320/85e52fc0/attachment.html>


More information about the rspec-users mailing list