summaryrefslogtreecommitdiff
path: root/test/psych
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-27 20:40:12 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-27 20:40:12 +0000
commit430e0ce4913ad868d8c60ba3e5a0936d0f47af72 (patch)
treeaa004448a5e67d2f9cc98211b6a31d9ef60c672a /test/psych
parentad3c1061a78f6efe0ee3584d92b3df448da9891f (diff)
* ext/psych/lib/psych/deprecated.rb: adding deprecated object_maker
method, * test/psych/test_deprecated.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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