# frozen_string_literal: true require 'dotenv/load' require 'simplecov' require 'webmock/rspec' SimpleCov.start do add_filter 'spec/' add_filter '.github/' end if ENV['CI'] == 'true' require 'codecov' SimpleCov.formatter = SimpleCov::Formatter::Codecov end require 'rating_chgk_v2' # Support files Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].sort.each { |f| require f } RSpec.configure do |config| config.include TestClient WebMock.allow_net_connect! WebMock::API.prepend(Module.new do extend self # disable VCR when a WebMock stub is created # for clearer spec failure messaging def stub_request(*args) VCR.turn_off! super end end) config.before { VCR.turn_on! } end