spec/int_spec.rb in bindata-0.8.1 vs spec/int_spec.rb in bindata-0.9.0

- old
+ new

@@ -10,11 +10,11 @@ BinData::Int16be, BinData::Int32le, BinData::Int32be, BinData::Int64le, BinData::Int64be].each do |klass| - klass.new.value.should eql(0) + klass.new.value.should be_zero end end it "should pass these tests" do [ @@ -40,11 +40,11 @@ BinData::Uint16be, BinData::Uint32le, BinData::Uint32be, BinData::Uint64le, BinData::Uint64be].each do |klass| - klass.new.value.should eql(0) + klass.new.value.should be_zero end end it "should pass these tests" do [ @@ -66,24 +66,24 @@ # run read / write tests for the given values def test_read_write(klass, val, clamped_val, str) # set the data and ensure clamping occurs data = klass.new data.value = val - data.value.should eql(clamped_val) + data.value.should == clamped_val # write the data io = StringIO.new data.write(io) # check that we write the expected byte pattern io.rewind - io.read.should eql(str) + io.read.should == str # check that we read in the same data that was written io.rewind data = klass.new data.read(io) - data.value.should eql(clamped_val) + data.value.should == clamped_val end # return test data for testing unsigned ints def gen_uint_test_data(nbytes, big_endian) raise "nbytes too big" if nbytes > 8