Sha256: 6dde4de44b6e1bc5909d7eb2cfbb3a5f9fe30a61feece7fa2f16334818021e52

Contents?: true

Size: 442 Bytes

Versions: 1

Compression:

Stored size: 442 Bytes

Contents

# encoding:utf-8
require './test/test_helper'

# Special tests for the JRuby encoder only
if RUBY_PLATFORM =~ /java/

class JRubyBSONTest < Test::Unit::TestCase
  include BSON

  def setup
    @encoder = BSON::BSON_CODER
    @decoder = BSON::BSON_RUBY
  end

  def test_object_id
    oid = {'doc' => BSON::ObjectId.new}
    p oid['doc'].data
    bson = @encoder.serialize(oid)
    assert_equal oid, @encoder.deserialize(bson)
  end

end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongo-1.1 test/bson/jruby_bson_test.rb