Testing HTTP APIs in Ruby
summary
Compares four concrete testing approaches and gives measurable tradeoffs: isolated unit tests with WebMock lead to blind spots, sandboxing against a real server catches protocol drift but turns a 1.5 minute test suite into ~15 minutes and sometimes into 1.5 hours with a partner, and shipping a fast in-memory fake server or a shared rack mapper (using Faraday / rack-client and Sinatra routes) yields quick tests and validated mocks by running both fake and real modes so the fake actually matches the live API.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:03Problem Statement
- 1:42Context
- 4:39Isolation Approach
- 12:33Figma Approach
- 14:14InMemory Representation
- 19:07Real vs Fake Mode
- 23:43Conclusion








