← Graph

Webmock unmocked

talk 19 connections

Bartosz Blimke's wroclove.rb 2024 talk — his second public presentation about WebMock (the first was in London 15 years earlier) and his first presentation in 14 years. Covers what WebMock is (stubbing HTTP requests and verifying HTTP calls), its origin story (inspired by FakeWeb's limitations, created during a one-day hackathon at New Bamboo), adoption numbers (250M+ downloads, ~4,000 GitHub stars, 260+ contributors, ~8,000 dependent gems), and features (HTTP-client-agnostic DSL, stub–execute–verify paradigm borrowed from Mockito, callbacks used by VCR, stubbing timeouts/basic auth/curl responses, helpful stubbing-instructions errors). Explains why mocking HTTP is useful: tests run offline, misconfigured production credentials can't fire destructive requests, tests are fast and stable, all status codes can be simulated, and development can proceed without third-party API access. Walks through how HTTP clients in Ruby generally work, then dissects WebMock internals: stub request creates a request-stub object (pattern + fake responses) in a global stub registry; callbacks go in a global callback registry; adapters subclass each HTTP client and monkey-patch the handle_request method to build a request signature, register it, match against the stub registry, return fake responses (or raise with stubbing instructions when real connections are blocked by default), run callbacks and middleware; constant replacement swaps the original client class for the instrumented copy so changes can be reverted. Ends with a personal tribute to the New Bamboo team ('Bambinos') and to the wroclove.rb organizers, emphasizing that the most important thing for a developer's growth is the people they work with. Q&A: contract testing isn't built into WebMock but scope-of-stub-validation is on Blimke's mind (global registries make scope hard today); there is no automated system for tracking HTTP-client changes — tests run against the latest gem versions, and incompatibilities are usually reported as issues.

date
2024-03-22
type
talk
talk Webmock unmocked
about
WebMock tool
Entire talk covers WebMock's features and internal architecture.
talk Webmock unmocked
about
FakeWeb tool
Blimke explains he tried FakeWeb first but its matching capabilities and Net::HTTP-only scope motivated him to create WebMock.
talk Webmock unmocked
about
VCR tool
VCR is mentioned as a gem that records HTTP requests and uses WebMock's callbacks under the hood.
talk Webmock unmocked
about
Mockito tool
WebMock's stub–execute–verify paradigm is borrowed from the Java Mockito framework.
talk Webmock unmocked
about
The talk explains how WebMock separates stubbing from verification — the stub–execute–verify paradigm.
talk Webmock unmocked
about
Monkey Patching concept
WebMock adapters work by subclassing HTTP-client classes and monkey-patching request handling; Blimke calls monkey patching 'bad' but notes the constant-replacement approach makes it revertible.
talk Webmock unmocked
about
Blimke recommends WebMock for TDD — define the expected HTTP behavior in the test first, worry about the HTTP client library later.
talk Webmock unmocked
about
HTTP gem tool
Talk example contrasts Net::HTTP's complicated interface with the HTTP gem's clean DSL when rewriting a test under WebMock.
talk Webmock unmocked
about
Net::HTTP tool
Talk mentions Net::HTTP as FakeWeb's only supported client and as the verbose legacy client that WebMock lets you swap out.
talk Webmock unmocked
about
curl tool
Talk notes WebMock can replay raw responses previously recorded with curl.
talk Webmock unmocked
about
New Bamboo company
Talk closes with a personal tribute to the New Bamboo team ('Bambinos') where WebMock was created.
asked_at
Webmock unmocked talk
Asked during Q&A at the end of Blimke's wroclove.rb 2024 talk.
asked_at
Webmock unmocked talk
Asked during Q&A at the end of Blimke's wroclove.rb 2024 talk.
authored
Webmock unmocked talk
Speaker and sole maintainer of WebMock presenting his second-ever WebMock talk at wroclove.rb 2024.
from_talk
Webmock unmocked talk
Blimke urged the audience to publish solutions that work for them, using WebMock as his example.
from_talk
Webmock unmocked talk
Recommendation from the talk for taking over legacy Ruby apps.
from_talk
Webmock unmocked talk
Pattern Blimke described for building and demoing features before third-party API access is granted.
talk Webmock unmocked
presented_at
Talk delivered as the final slot of wroclove.rb 2024 on 2024-03-22.
talk Webmock unmocked
related_to
Blimke references David Halasz's talk the day before about formal languages as inspiration for adding a university slide to his own presentation.

Provenance

Created
2026-04-17 16:17 seed
Read by
23 extractions