diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_psych.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb index 4f78ea96d9..0d33cb1970 100644 --- a/test/psych/test_psych.rb +++ b/test/psych/test_psych.rb @@ -14,6 +14,13 @@ class TestPsych < Psych::TestCase end end + def test_non_existing_class_on_deserialize + e = assert_raises(ArgumentError) do + Psych.load("--- !ruby/object:NonExistent\nfoo: 1") + end + assert_equal 'undefined class/module NonExistent', e.message + end + def test_dump_stream things = [22, "foo \n", {}] stream = Psych.dump_stream(*things) |