tl;dw: Stop mocking, start testing
We went through Enlightenment, now we have modern mocking:
- A common collection of authoritative mocks.
- The mock collection is narrow, only the things we really need to test.
- The mock is isolated. No code dependency between the mocks and the real code. Mocks don’t inherit from real implementations.
- Mocks are actually fakes. Lots of terms: mocks, stubs, dummies, fakes, doubles, etc. Fakes are full in-memory implementations of the interface they are mocking.
- What gets mocked? Only expensive external services. Everything else is real code.