diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-29 20:48:42 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-29 20:48:42 -0700 |
commit | 5ae604004516bc5944c38eee539b022bd7cf4820 (patch) | |
tree | 465fd16b50eb7df403c97708c347efad7ae7cf52 /test/visitors/test_yast_builder.rb | |
parent | 8328623efd2889ffcd513454d914385d480cce57 (diff) | |
download | psych-5ae604004516bc5944c38eee539b022bd7cf4820.zip |
round trip nil class
Diffstat (limited to 'test/visitors/test_yast_builder.rb')
-rw-r--r-- | test/visitors/test_yast_builder.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/visitors/test_yast_builder.rb b/test/visitors/test_yast_builder.rb index 3979566..36feb21 100644 --- a/test/visitors/test_yast_builder.rb +++ b/test/visitors/test_yast_builder.rb @@ -37,10 +37,15 @@ module Psych assert_round_trip(%w{ a b }) end + def test_nil + assert_round_trip nil + end + def assert_round_trip obj @v.accept(obj) assert_equal(obj, Psych.load(@v.tree.to_yaml)) assert_equal(obj, Psych.load(obj.to_yaml)) + assert_equal(obj, Psych.load(Psych.dump(obj))) end end end |