[rspec-devel] do we need stubbing?
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?
> rspec-devel mailing list
> rspec-devel at rubyforge.org
More information about the rspec-devel