diff --git a/gems/aws-eventstream/spec/decoder_spec.rb b/gems/aws-eventstream/spec/decoder_spec.rb index 72fddca8e83..5ef60dd85e2 100644 --- a/gems/aws-eventstream/spec/decoder_spec.rb +++ b/gems/aws-eventstream/spec/decoder_spec.rb @@ -72,7 +72,7 @@ module EventStream it '#decode_chunk buffers partial prelude message' do file = Dir.glob(File.expand_path('../fixtures/encoded/positive/*', __FILE__)).first - data = File.read(file) + data = File.open(file, "r:UTF-8", &:read) first_part = data[0..3] second_part = data[4..-1] decoder = Decoder.new(format: false)