Sha256: 2003e757c3fcd3d3f0470d4ffa2c2f08c6a5470fdf4865e83256262dc320a2a9
Contents?: true
Size: 290 Bytes
Versions: 2
Compression:
Stored size: 290 Bytes
Contents
require './test/test_helper' require 'rubygems' require 'json' class JSONTest < Test::Unit::TestCase include Mongo include BSON def test_object_id_as_json id = ObjectId.new obj = {'_id' => id} assert_equal "{\"_id\":{\"$oid\": \"#{id.to_s}\"}}", obj.to_json end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
mongo-1.1 | test/bson/json_test.rb |
bson-1.0.9 | test/mongo_bson/json_test.rb |