[rspec-users] Mocking: brittle specs and tight coupling?

Mark Wilden mark at mwilden.com
Sat Apr 11 19:13:22 EDT 2009

On Sat, Apr 11, 2009 at 3:59 PM, Brandon Olivares
<programmer2188 at gmail.com> wrote:

> I've read of complaints that mocking can make the specs very brittle, in
> that if the method is changed at all, it will break the specs, even if the
> behavior remains the same. Do you find this to be the case? How do you deal
> with this if so?

I change the spec. In theory, this may sound onerous, but I haven't
found it to be so in practice. Testing in general can introduce
dependencies, just as testing can introduce bugs. The idea however is
that tests are simpler than the code they're testing, so the bugs in
them are easier to fix and the dependencies fairly mechanical to deal


More information about the rspec-users mailing list