test/test_integration.rb in vacuum-1.4.0 vs test/test_integration.rb in vacuum-1.4.1
- old
+ new
@@ -1,7 +1,6 @@
require 'minitest/autorun'
-require 'minitest/pride'
require 'vcr'
require_relative '../lib/vacuum'
VCR.configure do |c|
c.hook_into :excon
@@ -26,19 +25,19 @@
end
# rubocop:disable AbcSize
def test_encoding_issues
params = { 'SearchIndex' => 'All', 'Keywords' => 'google' }
- titles = %w(BR CA CN DE ES FR GB IN IT JP US MX).flat_map do |locale|
+ titles = %w[BR CA CN DE ES FR GB IN IT JP US MX].flat_map do |locale|
req = Vacuum.new(locale)
req.associate_tag = 'foo'
res = req.item_search(query: params)
items = res.to_h['ItemSearchResponse']['Items']['Item']
items.map { |item| item['ItemAttributes']['Title'] }
end
encodings = titles.map { |t| t.encoding.name }.uniq
# Newer JRuby now appears to return both US-ASCII and UTF-8, depending on
# whether the string has non-ASCII characters. MRI will only return latter.
- assert encodings.any? { |encoding| encoding == 'UTF-8' }
+ assert(encodings.any? { |encoding| encoding == 'UTF-8' })
end
end