test/integration_helper.rb in peddler-1.6.0 vs test/integration_helper.rb in peddler-1.6.1

- old
+ new

@@ -1,9 +1,9 @@ require 'helper' require 'recorder' -%w(mws.yml mws.yml.example).each do |path| +%w[mws.yml mws.yml.example].each do |path| file = File.expand_path("../#{path}", __FILE__) if File.exist?(file) $mws = YAML.load_file(file) break end @@ -14,22 +14,20 @@ private def clients api = @api || test_name - $mws.map do |record| - MWS.const_get("#{api}::Client").new(record) - end + $mws.map { |record| MWS.const_get("#{api}::Client").new(record) }.shuffle end end ::Peddler::VCRMatcher.ignore_seller! VCR.configure do |c| c.before_record do |interaction| - %w( + %w[ BuyerName BuyerEmail Name AddressLine1 PostalCode Phone Amount - ).each do |key| + ].each do |key| interaction.response.body.gsub!(/<#{key}>[^<]+</, "<#{key}>FILTERED<") end end $mws.each do |record|