test/encode_reader_test.rb in iostreams-0.16.0 vs test/encode_reader_test.rb in iostreams-0.16.1

- old
+ new

@@ -9,11 +9,11 @@ "New M\xE9xico,\x07SF".b ].join("\n").encode('BINARY') end let :cleansed_data do - bad_data.gsub("\xE9".b, '?') + bad_data.gsub("\xE9".b, '') end let :stripped_data do cleansed_data.gsub("\x07", '') end @@ -30,21 +30,21 @@ end it 'strips invalid characters' do input = StringIO.new(bad_data) data = - IOStreams::Encode::Reader.open(input, encoding: 'UTF-8', encode_replace: '?') do |io| + IOStreams::Encode::Reader.open(input, encoding: 'UTF-8', encode_replace: '') do |io| io.read end assert_equal cleansed_data, data end end describe 'printable' do it 'strips non-printable characters' do input = StringIO.new(bad_data) data = - IOStreams::Encode::Reader.open(input, encoding: 'UTF-8', encode_cleaner: :printable, encode_replace: '?') do |io| + IOStreams::Encode::Reader.open(input, encoding: 'UTF-8', encode_cleaner: :printable, encode_replace: '') do |io| io.read end assert_equal stripped_data, data end end