test/helper.rb in peddler-0.13.0 vs test/helper.rb in peddler-0.14.0

- old
+ new

@@ -17,11 +17,17 @@ def self.each(&blk) @data.each(&blk) end - @data = YAML.load_file(File.expand_path('../mws.yml', __FILE__)) + %w(mws.yml mws.yml.example).each do |path| + file = File.expand_path("../#{path}", __FILE__) + if File.exists?(file) + @data = YAML.load_file(file) + break + end + end end # Sets up clients and bootstraps VCR for integration tests class IntegrationTest < MiniTest::Test def setup @@ -61,10 +67,10 @@ 'CreatedAfter', 'QueryStartDateTime' ) c.default_cassette_options = { match_requests_on: [:host, :path, matcher], - record: :none + record: !!ENV['RECORD'] ? :new_episodes : :none } # So that fixtures do not depend on merchant credentials Accounts.each do |account| c.filter_sensitive_data('MERCHANT_ID') { account['merchant_id'] }