Method: VCR::Cassette#originally_recorded_at

Defined in:
lib/vcr/cassette.rb

#originally_recorded_atTime?

Returns The ‘recorded_at` time of the first HTTP interaction or nil if the cassette has no prior HTTP interactions.

Examples:


VCR.use_cassette("some cassette") do |cassette|
  Timecop.freeze(cassette.originally_recorded_at || Time.now) do
    # ...
  end
end

Returns:

  • (Time, nil)

    The ‘recorded_at` time of the first HTTP interaction or nil if the cassette has no prior HTTP interactions.



166
167
168
# File 'lib/vcr/cassette.rb', line 166

def originally_recorded_at
  @originally_recorded_at ||= previously_recorded_interactions.map(&:recorded_at).min
end