require 'codeclimate-test-reporter'
require 'vcr'

CodeClimate::TestReporter.start

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

require 'mkm_api'
require 'webmock/rspec'

WebMock.disable_net_connect!(allow: %w(codeclimate.com))

VCR.configure do |config|
  config.ignore_hosts 'codeclimate.com'
  config.cassette_library_dir = 'fixtures/vcr_cassettes'
  config.hook_into :webmock
  config.configure_rspec_metadata!
  config.filter_sensitive_data('<AUTHENTICATION>') do |interaction|
    interaction.request.headers['Authorization'].first
  end
  config.filter_sensitive_data('<COOKIE>') do |interaction|
    interaction.response.headers['Set-Cookie'].first
  end
end
