spec/unpacker_spec.rb in ffi-msgpack-0.2.1 vs spec/unpacker_spec.rb in ffi-msgpack-0.2.2

- old
+ new

@@ -16,21 +16,21 @@ it "should enqueue data into the buffer" do size1 = @unpacker[:used] @unpacker << @packed size2 = @unpacker[:used] - (size2 - size1).should == @packed.length + expect(size2 - size1).to eq(@packed.length) end it "should enqueue data from IO objects into the buffer" do io = StringIO.new(@packed) size1 = @unpacker[:used] - @unpacker.read(io).should == true + expect(@unpacker.read(io)).to eq(true) size2 = @unpacker[:used] - (size2 - size1).should == @packed.length + expect(size2 - size1).to eq(@packed.length) end end describe "each_object" do it "should unpack each Msg Object from the buffer" do @@ -44,11 +44,11 @@ @unpacker << @packed @unpacker.each_object do |obj| objs << [obj.type, obj.values[:u64]] end - objs.should == expected + expect(objs).to eq(expected) end it "should unpack each Msg Object from a stream" do io = StringIO.new(@packed) objs = [] @@ -61,9 +61,9 @@ @unpacker.stream = io @unpacker.each_object do |obj| objs << [obj.type, obj.values[:u64]] end - objs.should == expected + expect(objs).to eq(expected) end end end