A universal approach to mocking
Summary
This article introduces a continuation-based approach to mocking in Gleam, shows how to defunctionalise continuations into a single Effect type, and demonstrates a tests-driven workflow that captures and verifies effects without executing them. It argues that this pattern yields clearer tests, reduces boilerplate, and ensures correct ordering of effectful calls across different kinds of effects.