summaryrefslogtreecommitdiff
path: root/test/psych
diff options
context:
space:
mode:
Diffstat (limited to 'test/psych')
-rw-r--r--test/psych/test_deprecated.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/psych/test_deprecated.rb b/test/psych/test_deprecated.rb
index 2312600ac8..a272db2332 100644
--- a/test/psych/test_deprecated.rb
+++ b/test/psych/test_deprecated.rb
@@ -199,5 +199,12 @@ module Psych
assert_equal 'int', things.first
assert_equal Object, things.last
end
+
+ def test_object_maker
+ thing = Psych.object_maker(Object, { 'a' => 'b', 'c' => 'd' })
+ assert_instance_of(Object, thing)
+ assert_equal 'b', thing.instance_variable_get(:@a)
+ assert_equal 'd', thing.instance_variable_get(:@c)
+ end
end
end