Testing HTTP APIs with Ruby
summary
Claim: a validated fake representation of the API gives fast local development and reliable CI verification. Implements an in-memory Sinatra fake that quacks like the real server, ships a mock mode (Fog/FakeWeb/WebMock mentioned), and switches to CI against real sandbox so tests run fast locally and hit the real API on CI. Examples use Faraday or Rack client redirection, show a 50-item limit test, and report it works but requires maintaining the fake and can confuse code navigation.
AI-written summary · about
chapters (8)
- 0:00Start
- 1:25Problem statement
- 4:37How do we test API's?
- 8:09Sandboxes
- 12:30Fake servers
- 19:13Mapper style
- 23:29Conclusions
- 24:53More resources
related talks
28mTesting HTTP APIs in Ruby
27mEffectively Testing Services
36mFake It While You Make It
29mForeign API Simulation with Sinatra
07mVerified fakes with OpenAPI
27mSimulating and Testing Third Party Service Integrations
30mFaking It - The Art of Testing Using Verified Fakes
35mFake It Before You Make It: Mocking Your Way to Better HTTP APIs
