test/float_test.rb in bindata-2.1.0 vs test/float_test.rb in bindata-2.2.0

- old
+ new

@@ -1,8 +1,8 @@ #!/usr/bin/env ruby -require File.expand_path(File.join(File.dirname(__FILE__), "common")) +require File.expand_path(File.join(File.dirname(__FILE__), "test_helper")) module FloatTest def test_num_bytes @obj.num_bytes.must_equal 4 end @@ -28,11 +28,11 @@ before do @obj = BinData::FloatLe.new(Math::PI) end it "#to_binary_s" do - @obj.to_binary_s.must_equal [Math::PI].pack('e') + @obj.to_binary_s.must_equal_binary [Math::PI].pack('e') end end describe "A FloatBe" do include FloatTest @@ -40,11 +40,11 @@ before do @obj = BinData::FloatBe.new(Math::PI) end it "#to_binary_s" do - @obj.to_binary_s.must_equal [Math::PI].pack('g') + @obj.to_binary_s.must_equal_binary [Math::PI].pack('g') end end describe "A DoubleLe" do include DoubleTest @@ -52,11 +52,11 @@ before do @obj = BinData::DoubleLe.new(Math::PI) end it "#to_binary_s" do - @obj.to_binary_s.must_equal [Math::PI].pack('E') + @obj.to_binary_s.must_equal_binary [Math::PI].pack('E') end end describe "A DoubleBe" do @@ -65,8 +65,8 @@ before do @obj = BinData::DoubleBe.new(Math::PI) end it "#to_binary_s" do - @obj.to_binary_s.must_equal [Math::PI].pack('G') + @obj.to_binary_s.must_equal_binary [Math::PI].pack('G') end end