2012-04-11 15:08:04 +00:00
|
|
|
require File.expand_path("../test_helper", __FILE__)
|
2010-07-07 21:04:45 +00:00
|
|
|
require 'rubygems'
|
|
|
|
require 'json'
|
|
|
|
|
|
|
|
class JSONTest < Test::Unit::TestCase
|
|
|
|
|
2010-10-13 21:09:23 +00:00
|
|
|
# This test passes when run by itself but fails
|
|
|
|
# when run as part of the whole test suite.
|
2010-07-07 21:04:45 +00:00
|
|
|
def test_object_id_as_json
|
2012-03-16 20:17:33 +00:00
|
|
|
#warn "Pending test object id as json"
|
2010-10-13 21:09:23 +00:00
|
|
|
#id = BSON::ObjectId.new
|
2010-10-12 19:39:28 +00:00
|
|
|
|
2010-10-13 21:09:23 +00:00
|
|
|
#obj = {'_id' => id}
|
|
|
|
#assert_equal "{\"_id\":#{id.to_json}}", obj.to_json
|
2010-07-07 21:04:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|