Testing: Cable and Chain
summary
Argues Elixir teams stop writing slow fragile integration-heavy specs and split tests into cable = integrated tests that assert connections and chain mail unit tests that assert pure business logic. Demonstrates brittle global stubs via Application.get_env and process message passing that cause flaky CI, then replaces them with local stubs via dependency injection and a separate pure business logic module, yielding tiny in-memory tests plus one thin integration test to prove wiring, which runs fast and reliably.
AI-written summary · about
chapters (27)
- 0:00Intro
- 0:27clever cloud
- 1:44Testing: Cable and Chain
- 2:01Mark Windholtz
- 2:40Expecting
- 2:54Sometimes
- 4:32Good Tests Enable
- 5:21Types of Developer Tests
- 5:47Integrated Tests
- 6:00Why not Cable everything?
- 6:39update_cables()
- 7:03Unit Tests
- 8:09A Set of Unit Testing Rules
- 8:32NOT a Unit Test
- 9:00Watch out for
- 9:31Functional Programming
- 10:42User Story
- 10:59Isolate Side-effects
- 11:25not testable
- 12:53Sweeper 02 - Global Stub - Test
- 15:15Prefer Local Stubs
- 15:35Sweeper 03 Single Responsibility Principle
- 17:14Building tests
- 17:27Outside - In
- 18:00Inside - Out
- 19:16More Pure Domain
- 19:36New Code








