Fake Your Test Away: How To Abuse Your Test Doubles
summary
Claims that overused test doubles make suites brittle and unhelpful and shows concrete fixes in Ruby: a few real examples with ActiveRecord callbacks, background jobs and even an external search client lead to two failure modes, integration tests with random doubles and helicopter unit tests. Remedies: apply the principle of least knowledge, separate decisions and delegations, introduce a small restaurant_repo and dependency injection, and the resulting tests are simpler, fewer, and actually catch regressions.
AI-written summary · about
chapters (5)
- 0:00Start
- 2:11Let's talk about testing
- 4:42Testing pyramid, reality edition
- 11:13The dependency graph
- 22:03Testing pyramid with decision and delegation








