summaryrefslogtreecommitdiff
path: root/test/psych/test_deprecated.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/psych/test_deprecated.rb')
-rw-r--r--test/psych/test_deprecated.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/psych/test_deprecated.rb b/test/psych/test_deprecated.rb
index 6db7238b0c..2312600ac8 100644
--- a/test/psych/test_deprecated.rb
+++ b/test/psych/test_deprecated.rb
@@ -187,5 +187,17 @@ module Psych
assert_equal Psych, Psych.tagurize(Psych)
assert_equal 'tag:yaml.org,2002:foo', Psych.tagurize('foo')
end
+
+ def test_read_type_class
+ things = Psych.read_type_class 'tag:yaml.org,2002:int:Psych::TestDeprecated::QuickEmitter', Object
+ assert_equal 'int', things.first
+ assert_equal Psych::TestDeprecated::QuickEmitter, things.last
+ end
+
+ def test_read_type_class_no_class
+ things = Psych.read_type_class 'tag:yaml.org,2002:int', Object
+ assert_equal 'int', things.first
+ assert_equal Object, things.last
+ end
end
end