diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_deprecated.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/psych/test_deprecated.rb b/test/psych/test_deprecated.rb index c93b36ed44..f5ff79b56d 100644 --- a/test/psych/test_deprecated.rb +++ b/test/psych/test_deprecated.rb @@ -163,5 +163,13 @@ module Psych assert_equal [["tag:ruby.yaml.org,2002:foo", "bar"]], types end + + def test_detect_implicit + assert_equal '', Psych.detect_implicit(nil) + assert_equal '', Psych.detect_implicit(Object.new) + assert_equal '', Psych.detect_implicit(1.2) + assert_equal 'null', Psych.detect_implicit('') + assert_equal 'string', Psych.detect_implicit('foo') + end end end |