Summary (TL;DR)
A recent 'Is TDD Dead?' discussion with DHH, Martin Fowler, and Kent Beck criticized excessive mocking and stubbing in tests. Mocks become dangerous when used to isolate code from internal collaborators, causing false positives: tests pass even when code has bugs, method names are wrong, or interfaces change. The gurus argued that a 'unit' should be defined as a behavior, not necessarily a class or method. Tests should be shallow enough to verify one behavior, not mock everything. Over-mocking undermines confidence that tests actually catch breakage. Developers should reconsider their test design and mock only when truly needed.
Public access expired
Save this link to your readplace queue to see the full content.
Save to My Queue