./tests/test_json.rb in json-maglev--1.6.7 vs ./tests/test_json.rb in json-maglev--1.7.0
- old
+ new
@@ -314,17 +314,17 @@
assert_equal "bar", res.foo
assert_equal(SubOpenStruct, res.class)
assert res.item_set?
end
- def test_parse_light_object
- res = parse('{"foo":"bar", "baz":{}}', :object_class => JSON::LightObject)
- assert_equal(JSON::LightObject, res.class)
+ def test_parse_generic_object
+ res = parse('{"foo":"bar", "baz":{}}', :object_class => JSON::GenericObject)
+ assert_equal(JSON::GenericObject, res.class)
assert_equal "bar", res.foo
assert_equal "bar", res["foo"]
assert_equal "bar", res[:foo]
assert_equal "bar", res.to_hash[:foo]
- assert_equal(JSON::LightObject, res.baz.class)
+ assert_equal(JSON::GenericObject, res.baz.class)
end
def test_generate_core_subclasses_with_new_to_json
obj = SubHash2["foo" => SubHash2["bar" => true]]
obj_json = JSON(obj)