Yay! Mocks!
summary
Argues that mocks and test doubles are tools to drive design not just brittle verification, shows RSpec-style doubling and a Rails app built for Code Retreats to demonstrate pain points: controller tests brittle from passing a model hash, doubles returning doubles, and validation noise forcing DB hits. Recommends inserting a scope for todays, pushing logic into services, replacing layered leaks with a presenter, and changing the design when tests are hard to write.
AI-written summary · about
chapters (8)
- 0:00Start
- 8:32Easier to change
- 11:30is about messages
- 12:30is about interactions
- 12:56is about services
- 14:31Development
- 22:13David Parnas 1972
- 35:143. No Duplication (DRY)
related talks
29m"Testing. Why so serious?"
36mTo Mock or Not to Mock
01h 00mTesting Heresies
44mCharity Workshop: Ruby and Rails Testing Techniques
27mFake Your Test Away: How To Abuse Your Test Doubles
39mPlease Don't Mock Me
36mWeaving and seaming mocks
16mTDD Workshop: Mocking, Stubbing, and Faking External Services
