[rspec-devel] do we need stubbing?

Jay jay at jayfields.com
Wed Oct 4 12:30:34 EDT 2006

I found that making mocks easy to use ended up removing my need for  
stubs.  Since I've moved to using Mocha, I basically never use stubs  

my 2 cents.

On Oct 4, 2006, at 10:03 AM, David Chelimsky wrote:

> Hey all -
> The trunk currently supports three types of mocking/stubbing:
> Mock Objects (created dynamically at runtime)
> Partial Mocking of methods on existing classes
> Stubbing of methods on existing objects or classes
> The main difference between Partial Mocking and Stubbing is that Stubs
> don't verify.
> I'm wondering if we really need the stubbing facility at all, given
> that we can do the same thing using Partial Mocks. If we decided to
> yank the Stubs, we could add Partial Mocks support to objects (right
> now it only works on classes).
> Note that this functionality is not part of a release yet, so any such
> changes would only affect the brave trunk-dwellers among you.
> Any thoughts on this? Can anyone explain to me why stubs are useful in
> addition to partial mocks?
> David
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel

More information about the rspec-devel mailing list