WebMock Unmocked
summary
WebMock is a Ruby library born in a one‑day 2009 hackathon that now has 270 million+ downloads and ~4,000 GitHub stars and 260+ contributors, designed to stub and verify HTTP with a client‑agnostic DSL. It prevents real HTTP by default, supports all popular Ruby HTTP clients and testing frameworks, records responses with curl, runs callbacks, and implements a stub‑execute‑verify paradigm. Internally it uses subclass‑and‑constant‑replacement monkey patching to build request signatures, match stubs, and either return fake responses or allow/raise for real requests.
AI-written summary · about
chapters (7)
- 0:00WebMock introduction
- 1:34What WebMock is
- 6:20Mocking HTTP benefits
- 9:30WebMock vs alternatives
- 12:45WebMock internals
- 20:46Monkey patching approach
- 22:10Community role








