[Rspec-devel] define_instance_method, stub_with, and mock_with

David Astels dastels at daveastels.com
Sun Aug 27 17:11:35 EDT 2006


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


On 27-Aug-06, at 4:51 PM, David Chelimsky wrote:

> As for the idea you are presenting, in general, I think that mocking
> methods on real instances is  a risky proposition. I've seen this
> result in tests that are very difficult to understand when they fail,
> as some methods on the instance are mocked and some are not. I also
> have yet to see a case where   using partial mocks is a better
> decision than improving the decoupling in the system under test.
>
> That's just my 2 cents. Anyone else?

I agree.  Partial mocks can get very confusing, very easily.

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

iD4DBQFE8gqIauez/L4x7g4RAjpCAKDjtFmylU+508YBYHhJ6Ht9vQN23ACXdv4r
yhLqDl+7/htXR2TliE4ZHg==
=yEcS
-----END PGP SIGNATURE-----


More information about the Rspec-devel mailing list