[rspec-devel] do we need stubbing?

Dave Astels dastels at daveastels.com
Wed Oct 4 12:07:48 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 4-Oct-06, at 11:03 AM, David Chelimsky wrote:

> Any thoughts on this? Can anyone explain to me why stubs are useful in
> addition to partial mocks?

What is a stub?  IMO it's a mock that is set to accept any number of  
calls with any arguments, with a set (or default) return value/action  
(i.e. raises a specific exception every time it's called).

So, I can't (at the moment) see what we gain by having both.

My advice would be to put stubs on the shelf until such time (if  
ever) that there is a proven need for them in addition to partial mocks.

Dave

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFFI9xUauez/L4x7g4RApUDAJ9+Rc1P10Y+fP7oi8reT27d7+8G3wCfTFQ2
+IRDMqvktfCbzhvWHKBdWXU=
=3t5l
-----END PGP SIGNATURE-----


More information about the rspec-devel mailing list