test/delayed_io_test.rb in bindata-2.4.8 vs test/delayed_io_test.rb in bindata-2.4.9
- old
+ new
@@ -97,19 +97,19 @@
obj.write_now!
}.must_raise IOError
end
it "writes explicitly" do
- io = StringIO.new "\001\002\003\004\005\006\007\010\011"
+ io = StringIO.new "\001\002\003\004\005\006\007\010\011".dup
obj = IntDelayedIO.new(3)
obj.write(io)
obj.write_now!
io.value.must_equal "\001\002\003\004\005\000\003\010\011"
end
it "writes explicitly after setting abs_offset" do
- io = StringIO.new "\001\002\003\004\005\006\007\010\011"
+ io = StringIO.new "\001\002\003\004\005\006\007\010\011".dup
obj = IntDelayedIO.new(7)
obj.write(io)
obj.abs_offset = 1
obj.write_now!
@@ -137,10 +137,10 @@
obj.snapshot.must_equal({len: 3, str: "abc"})
end
it "writes explicitly" do
- io = StringIO.new "\001\002\003\004\005\006\007\010\011\012\013\014\015"
+ io = StringIO.new "\001\002\003\004\005\006\007\010\011\012\013\014\015".dup
obj = StringDelayedIO.new(str: "hello")
obj.write(io)
obj.write_now!
io.value.must_equal "\001\002\003\004\005\000\005hello\015"
end