test/test_helper.rb in active_shipping-1.14.2 vs test/test_helper.rb in active_shipping-2.0.0

- old
+ new

@@ -1,25 +1,35 @@ require 'bundler/setup' require 'minitest/autorun' +require "minitest/reporters" require 'mocha/mini_test' require 'timecop' require 'business_time' require 'active_shipping' require 'logger' require 'erb' require 'pry' +require 'vcr' +require 'webmock/minitest' -# This makes sure that Minitest::Test exists when an older version of Minitest -# (i.e. 4.x) is required by ActiveSupport. -unless defined?(Minitest::Test) - Minitest::Test = MiniTest::Unit::TestCase -end +require_relative 'helpers/holiday_helpers.rb' +Minitest::Reporters.use! Minitest::Reporters::ProgressReporter.new(detailed_skip: !!ENV["CI"]) -class Minitest::Test +VCR.configure do |config| + config.cassette_library_dir = 'test/remote/vcr_cassettes' + config.allow_http_connections_when_no_cassette = true + config.hook_into :webmock +end + +class ActiveSupport::TestCase include ActiveShipping + + def logger + @logger ||= Logger.new(STDERR) + end end module ActiveShipping::Test module Credentials class NoCredentialsFound < StandardError