CheckOps
VCR (Ruby)
VCR is a Ruby library that records your test suite's HTTP interactions to cassettes and replays them in future runs for fast, deterministic, accurate tests; it uses the Hippocratic License 2.1.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
VCR records your test suite’s HTTP interactions and replays them during future test runs for fast, deterministic, accurate tests. It is the original library that inspired ports such as VCR.py, and it remains widely used in Ruby projects that integrate with third-party APIs.
Wrap code in VCR.use_cassette("name") { ... } (or use the RSpec metadata integration) and the first run records real requests and responses to a YAML cassette; later runs replay them. VCR hooks into HTTP libraries through WebMock or other adapters, and supports record modes (:once, :new_episodes, :none, :all), configurable request matching, filter_sensitive_data to keep secrets out of cassettes, automatic re-recording intervals and ERB in cassettes. Licensing is unusual: the project uses the Hippocratic License 2.1, which grants broad permissions conditioned on compliance with human rights principles; organisations should review it with legal advisers. Version 6.4.1 was released on 30 October 2026.
Its documentation site is generated from Cucumber features describing each option.
Features
- Record and replay: Real HTTP captured once, replayed thereafter.
- Record modes: once, new_episodes, none and all.
- Sensitive data filtering: Keep tokens out of cassettes.
- RSpec integration: Cassettes via example metadata.
Pros
- Free: No cost to use.
- Mature: The original record-and-replay library.
Cons
- Licence review: The Hippocratic License is not an OSI-approved open-source licence.
- Stale cassettes: Recorded responses drift from real APIs over time.
Usage and Links (Example)
VCR.configure do |c|
c.cassette_library_dir = "spec/cassettes"
c.hook_into :webmock
c.configure_rspec_metadata!
c.filter_sensitive_data("<API_KEY>") { ENV["API_KEY"] }
end
RSpec.describe WeatherClient, :vcr do
it "fetches the forecast" do
expect(WeatherClient.new.today("London")).to include("temp")
end
end
Resources:
Pricing
Free to use under the Hippocratic License 2.1 (see the repository’s LICENSE for conditions).
Recommended for?
- Ruby apps calling third-party APIs that should be tested offline.
- Teams able to accept the Hippocratic License after review.
Conclusion
VCR is the original and still excellent record-and-replay HTTP testing library for Ruby; review its licence before adopting it.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with VCR (Ruby) side by side.
WWebMockWebMock is an MIT-licensed Ruby library for stubbing and setting expectations on HTTP requests, supporting many HTTP clients and blocking real network access in tests.Compare with VCR (Ruby)
VVCR.pyVCR.py is an MIT-licensed Python library, ported from Ruby's VCR, that records HTTP interactions to cassette files and replays them in later test runs for fast, deterministic, offline tests.Compare with VCR (Ruby)
RRSpecRSpec is the MIT-licensed behaviour-driven testing framework for Ruby, made up of rspec-core, rspec-expectations and rspec-mocks, and widely used with Rails via rspec-rails.Compare with VCR (Ruby)
MMinitestMinitest is an MIT-licensed, fast and lightweight Ruby testing library providing xUnit-style tests, a spec DSL and benchmarks; it is the default testing framework in Ruby on Rails.Compare with VCR (Ruby)
WWireMockA tool for mocking HTTP services.Compare with VCR (Ruby)
HHoverflyLightweight service virtualization/ API simulation / API mocking tool for developers and testers.Compare with VCR (Ruby)