test/delayed_io_test.rb in bindata-2.4.11 vs test/delayed_io_test.rb in bindata-2.4.12
- old
+ new
@@ -198,26 +198,26 @@
end
it "reads" do
obj = DelayedIOOnlyIfRecord.read "\x01\x00\x03\x0012345"
obj.num_bytes.must_equal 1
- obj.snapshot.must_equal({flag: 1, my_int1: 6, my_int2: 7})
+ obj.snapshot.must_equal({flag: 1, my_int1: 6})
end
it "reads explicitly when flag is set" do
obj = DelayedIOOnlyIfRecord.read "\x01\xff\x01\x00\x02\x00"
obj.my_int1.read_now!
obj.my_int2.read_now!
obj.num_bytes.must_equal 1
- obj.snapshot.must_equal({flag: 1, my_int1: 2, my_int2: 7})
+ obj.snapshot.must_equal({flag: 1, my_int1: 2})
end
it "reads explicitly when flag is not set" do
obj = DelayedIOOnlyIfRecord.read "\x00\xff\x01\x00\x02\x00"
obj.my_int1.read_now!
obj.my_int2.read_now!
obj.num_bytes.must_equal 1
- obj.snapshot.must_equal({flag: 0, my_int1: 6, my_int2: 1})
+ obj.snapshot.must_equal({flag: 0, my_int2: 1})
end
it "writes" do
obj = DelayedIOOnlyIfRecord.new(flag:1, my_int1: 3, my_int2: 4)
io = StringIO.new