Sha256: 5abf11b3c3492dcf6a2532bac6a217cb85324dbefe960db784c997c546cfb03c

Contents?: true

Size: 1 KB

Versions: 14

Compression:

Stored size: 1 KB

Contents

# frozen_string_literal: true

Dir[File.expand_path('../vcr_matchers/**/*.rb', __dir__)].each { |f| require f }

if defined?(::WebMock)
  VCR.configure do |config|
    config.hook_into :webmock
  end
end

if defined?(::Faraday)
  VCR.configure do |config|
    config.hook_into :faraday
  end
end

RSpec.configure do |config|
  config.around(:each, :vcr => lambda { |v| !!v }) do |example|
    VCR.configuration.allow_http_connections_when_no_cassette = false

    example.run

    VCR.configuration.allow_http_connections_when_no_cassette = true
  end
end

VCR.configure do |config|
  config.ignore_hosts 'lvh.me', 'localhost', '127.0.0.1', '0.0.0.0' # rubocop:disable Style/IpAddresses

  config.cassette_library_dir                    = File.expand_path('./tmp/vcr_cassettes')
  config.allow_http_connections_when_no_cassette = true

  # So that the Code Climate coverage reporter (if installed) can send reports
  # even though VCR is enabled.
  config.ignore_hosts 'codeclimate.com'

  config.configure_rspec_metadata!
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rspeckled-1.0.3 lib/rspeckled/plugins/vcr.rb
rspeckled-1.0.2 lib/rspeckled/plugins/vcr.rb
rspeckled-1.0.1 lib/rspeckled/plugins/vcr.rb
rspeckled-1.0.0 lib/rspeckled/plugins/vcr.rb
rspeckled-0.0.64 lib/rspeckled/plugins/vcr.rb
rspeckled-0.0.63 lib/rspeckled/plugins/vcr.rb
rspeckled-0.0.62 lib/rspeckled/plugins/vcr.rb
rspeckled-0.0.61 lib/rspeckled/plugins/vcr.rb
rspeckled-0.0.60 lib/rspeckled/plugins/vcr.rb
rspeckled-0.0.59 lib/rspeckled/plugins/vcr.rb
rspeckled-0.0.58 lib/rspeckled/plugins/vcr.rb
rspeckled-0.0.57 lib/rspeckled/plugins/vcr.rb
rspeckled-0.0.56 lib/rspeckled/plugins/vcr.rb
rspeckled-0.0.55 lib/rspeckled/plugins/vcr.rb