Sha256: 412e003ba2412502388727b0011aa9d44b61193707a92c576d6929a856e1c234

Contents?: true

Size: 514 Bytes

Versions: 3

Compression:

Stored size: 514 Bytes

Contents

require_relative "../test_helper"

class TestMessagePackEncoding < Test::Unit::TestCase
  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

3 entries across 3 versions & 1 rubygems

Version Path
msgpack_rails-0.3.0 test/msgpack_rails/encoding_test.rb
msgpack_rails-0.1.0 test/msgpack_rails/encoding_test.rb
msgpack_rails-0.0.1 test/msgpack/encoding_test.rb