diff options
Diffstat (limited to 'test/psych/test_psych.rb')
-rw-r--r-- | test/psych/test_psych.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb index 0d33cb1970..f3f3a531b3 100644 --- a/test/psych/test_psych.rb +++ b/test/psych/test_psych.rb @@ -8,6 +8,16 @@ class TestPsych < Psych::TestCase Psych.domain_types.clear end + def test_indent + yml = Psych.dump({:a => {'b' => 'c'}}, {:indentation => 5}) + assert_match(/^[ ]{5}b/, yml) + end + + def test_canonical + yml = Psych.dump({:a => {'b' => 'c'}}, {:canonical => true}) + assert_match(/\? ! "b/, yml) + end + def test_load_argument_error assert_raises(TypeError) do Psych.load nil |