VCR
v-6.0.0
v-6.0.0
  • Introduction
  • Upgrade
  • Changelog
  • About These Examples
  • License
  • Contributing
  • Cassettes
    • Cassette Format
    • Naming
    • Error for HTTP Request Made When No Cassette Is in Use
    • Dynamic ERB Cassettes
    • Automatic Re-Recording
    • Exclusive Cassette
    • Update Content Length Header
    • Decode Compressed Response
    • Allow Unused HTTP Interactions
    • Freezing Time
  • Record modes
    • Once
    • New Episodes
    • None
    • All
    • Record on Error
  • Configuration
    • Cassette Library Dir
    • Hook Into
    • Default Cassette Options
    • Ignore Request
    • Filter Sensitive Data
    • Allow HTTP Connections When No Cassette
    • Debug Logging
    • Preserve Exact Body Bytes
    • URI Parser
    • Query Parser
  • Hooks
    • Before Record Hook
    • Before Playback Hook
    • Before HTTP Request Hook
    • After HTTP Request Hook
    • Around HTTP Request Hook
  • Request matching
    • Introduction
    • Matching on Method
    • Matching on URI
    • Matching on Host
    • Matching on Path
    • Matching on Query String
    • Matching on Body
    • Matching on Headers
    • Identical Requests Are Replayed in Sequence
    • Register and Use a Custom Matcher
    • URI Without Param(s)
    • Playback Repeats
    • Matching on Body as JSON
  • Test frameworks
    • Usage With Test::Unit
    • Usage With RSpec Metadata
    • Usage With Cucumber
  • Middleware
    • Rack
    • Faraday Middleware
  • HTTP Libraries
    • Net::HTTP
    • EM HTTP Request
Powered by GitBook
On this page

Was this helpful?

About These Examples

PreviousChangelogNextLicense

Last updated 4 years ago

Was this helpful?

The cucumber features provided here demonstrate all of the major features of VCR. These features are executable documentation for VCR.

Many of the examples use one (or both) of these helper functions provided by spec/support/cucumber_helpers.rb:

  • start_sinatra_app: starts a sinatra application on the given port.

    The server automatically shuts down when the ruby script ends. Many

    examples re-run the script without the sinatra server to demonstrate

    the replaying of a recorded HTTP response.

  • include_http_adapter_for: includes a module that implements a common

    HTTP interface for the given HTTP library. The response_body_for

    method will make an HTTP request using the given library. This

    allows scenarios to be run against each different supported HTTP

    library.

If you have ideas to clarify or improve any of these cucumber features, please submit an or pull request.

issue