The media VCR uses to store HTTP interactions for later re-use.
| VALID_RECORD_MODES | = | [:all, :none, :new_episodes, :once] |
The supported record modes.
* :all -- Record every HTTP interactions; do not play any back.
* :none -- Do not record any HTTP interactions; play them back.
* :new_episodes -- Playback previously recorded HTTP interactions and record new ones.
* :once -- Record the HTTP interactions if the cassette has not already been recorded;
otherwise, playback the HTTP interactions.
|
| erb | [R] |
@return [Boolean, Hash] The cassette‘s ERB option. The file will be treated as an
ERB template if this has a truthy value. A hash, if provided, will be used as local variables for the ERB template. |
| match_requests_on | [R] |
@return [Array<Symbol, call>] List of request matchers. Used to find
a response from an
existing HTTP interaction to play back. |
| name | [R] | @return [to_s] The name of the cassette. Used to determine the cassette‘s file name. @see file |
| re_record_interval | [R] | @return [Integer, nil] How frequently (in seconds) the cassette should be re-recorded. |
| record_mode | [R] |
@return [Symbol] The record mode. Determines whether the cassette records
HTTP interactions,
plays them back, or does both. |
| tags | [R] |
@return [Array<Symbol>] If set, {VCR::Configuration#before_record} and
{VCR::Configuration#before_playback} hooks with a corresponding tag will apply.
|
Ejects the current cassette. The cassette will no longer be used. In addition, any newly recorded HTTP interactions will be written to disk.
@note This is not intended to be called directly. Use `VCR.eject_cassette` instead.
@param (see VCR#eject_casssette) @see VCR#eject_cassette
@return [Time, nil] The `recorded_at` time of the first HTTP interaction
or nil if the cassette has no prior HTTP interactions.
@example
VCR.use_cassette("some cassette") do |cassette|
Timecop.freeze(cassette.originally_recorded_at || Time.now) do
# ...
end
end