test/helper.rb in peddler-1.0.0 vs test/helper.rb in peddler-1.0.1

- old
+ new

@@ -1,7 +1,8 @@ require 'simplecov' require 'coveralls' +require 'peddler/test/vcr_matcher' SimpleCov.formatters = [ SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter ] @@ -14,11 +15,11 @@ require 'minitest/autorun' require 'yaml' require 'vcr' begin require 'pry' -rescue LoadError +rescue LoadError # rubocop:disable HandleExceptions end # Wraps MWS credentials to run integration tests against # # Replace entries in the fixture file with real credentials if adding new tests @@ -70,18 +71,11 @@ # HTTP errors are not Peddler's concern, so ignore them to ease development. c.before_record do |interaction| code = interaction.response.status.code interaction.ignore! if code >= 400 && code != 414 end - - # Ignore transient params when building VCR fixtures. - matcher = VCR.request_matchers.uri_without_param( - 'AWSAccessKeyId', 'SellerId', 'Signature', 'Timestamp', 'StartDate', - 'CreatedAfter', 'QueryStartDateTime' - ) - c.default_cassette_options = { - match_requests_on: [:host, :path, matcher], + match_requests_on: [::Peddler::Test::VCRMatcher], record: !ENV['RECORD'] ? :none : :new_episodes } # So that fixtures do not depend on merchant credentials Accounts.each do |account|