[rspec-devel] do we need stubbing?

David Chelimsky dchelimsky at gmail.com
Wed Oct 4 10:03:07 EDT 2006


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


More information about the rspec-devel mailing list