https://www.destroyallsoftware.com/talks/boundaries
- test doubles
- test isolation example: Sweeper
- win: enables test-driven design
- win: outside-in tdd (top-down)
- win: fast tests
- lose: mocks and stubs may diverge from reality
- how can we fix the problems with isolated unit testing?
- contract & collaboration tests
- use tools (rspec-fire)
- static typing / static mocks
- use integration tests (don't isolate)
- but integration tests are a scam
- don't scale (too many paths)
- superlinear test suite runtime
- but integration tests are a scam
- values
- pure functions are naturally isolated
- let values be the boundaries
- paradigms
- procedural
- OOP
- functional
- fauxO
- functional core / imperative shell
- core:
- many paths
- no dependencies
- isolated
- naturally suited to unit testing
- shell
- few paths
- many dependencies
- integrated
- naturally suited to integration testing
- core:
- concurrency
- actor model
- processes with inboxes (queues)
- the value is the boundary
- actor model
terminology to follow up on:
- test doubles vs mocks vs stubs
let simple values be the boundaries between systems.