Sha256: 222dc3d613250ca1ce8b7a573538a4a1b0ce68a360dc602cc119c34eecc6c5f7
Contents?: true
Size: 794 Bytes
Versions: 4
Compression:
Stored size: 794 Bytes
Contents
require 'peddler/vcr_matcher' require 'yaml' require 'vcr' # So we can continue testing against old Content-MD5 header ::Peddler::VCRMatcher.ignored_params << 'ContentMD5Value' VCR.configure do |c| c.hook_into :excon c.cassette_library_dir = 'test/vcr_cassettes' c.default_cassette_options = { match_requests_on: [::Peddler::VCRMatcher], record: ENV['RECORD'] ? :new_episodes : :none } # c.before_record do |interaction| # code = interaction.response.status.code # interaction.ignore! if code >= 400 && code != 414 # end end module Recorder def setup ENV['LIVE'] ? VCR.turn_off! : VCR.insert_cassette(test_name) end def teardown VCR.eject_cassette if VCR.turned_on? end private def test_name self.class.name.sub('Test', '') end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
peddler-1.6.3 | test/recorder.rb |
peddler-1.6.2 | test/recorder.rb |
peddler-1.6.1 | test/recorder.rb |
peddler-1.6.0 | test/recorder.rb |