Sha256: 3adebafcd21ae363777326d4d30ea947b117b4528112dc3798c43b5bac446e29

Contents?: true

Size: 508 Bytes

Versions: 4

Compression:

Stored size: 508 Bytes

Contents

require_relative "../test_helper"

class TestMessagePackEncoding < Minitest::Test
  def test_default_encoding
    [nil, true, false, 10, 123456789 ** 2, 1.0, "foo", [:foo, :bar], {:a => :b}, :a].each do |data|
      assert_equal MessagePack.pack(data), ActiveSupport::MessagePack.encode(data)
    end
  end

  def test_extension_encoding
    [Time.now, /foo/, Date.new, DateTime.new].each do |data|
      assert_equal MessagePack.pack(data.as_json), ActiveSupport::MessagePack.encode(data)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
msgpack_rails-0.4.3 test/msgpack_rails/encoding_test.rb
msgpack_rails-0.4.2 test/msgpack_rails/encoding_test.rb
msgpack_rails-0.4.1 test/msgpack_rails/encoding_test.rb
msgpack_rails-0.4.0 test/msgpack_rails/encoding_test.rb