$ account stripe-ruby-mock
Stripe-ruby-mock is a Ruby library that provides in-memory mocking of the Stripe API for testing purposes. It intercepts Stripe HTTP requests and returns simulated responses, enabling offline, deterministic testing without real API keys or network access. The library supports both local mocking (via `StripeMock.start`/`stop`) and a remote mock server for integration tests across processes. It covers a wide range of Stripe endpoints including charges, customers, subscriptions, invoices, payment intents, and webhooks, with extensive shared RSpec examples and webhook fixtures. The architecture follows a modular request-handler pattern, with helpers for token generation, param validation, and search simulation. While the codebase is well-structured and popular (996 stars), it shows signs of maintenance strain (199 open issues, call for core maintainers) and technical drift (vendored Trollop CLI parser, outdated webhook fixtures, limited Stripe API version coverage). It remains a valuable tool for legacy Stripe testing but may require updates to fully align with current Stripe API changes.