The Debate of Mockist/Classicist TDD Is Like OOP/FP.
fagnerbrack.com
5 min read
View original
Summary (TL;DR)
The article argues that the debate between Detroit (classicist) and London (mockist) TDD is actually a design paradigm debate, not a testing technique debate. Detroit TDD mirrors functional programming by testing pure logic with real dependencies and no mocks, while London TDD mirrors classical OOP by isolating units with mocks to test behavior and interfaces. Mocks serve design discovery, not just test determinism, but require disciplined practice like mocking only owned types and using contract tests. Functional programming avoids mocks by pushing impurity to the edges, but still needs substitutes for impure functions. Both schools agree on integration tests, and the testing style should match the code's design paradigm. The real question is which paradigm the code follows, not which school is better.