mongo-ruby-driver/test/bson/json_test.rb
2010-10-12 15:39:28 -04:00

16 lines
269 B
Ruby

require './test/test_helper'
require 'rubygems'
require 'json'
class JSONTest < Test::Unit::TestCase
def test_object_id_as_json
id = BSON::ObjectId.new
p id.to_json
obj = {'_id' => id}
assert_equal "{\"_id\":#{id.to_json}}", obj.to_json
end
end