diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-29 20:07:27 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-29 20:07:27 -0700 |
commit | 1bb355c1935530f9d9a797c53708b0ac5d1898fa (patch) | |
tree | 3089d7c78a2053351f8bc9c60c47ba90e72002c5 /test/visitors | |
parent | f7a4949ef5ba75348843ecc0564f284675c7be2e (diff) | |
download | psych-1bb355c1935530f9d9a797c53708b0ac5d1898fa.zip |
hash round trip
Diffstat (limited to 'test/visitors')
-rw-r--r-- | test/visitors/test_yast_builder.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/visitors/test_yast_builder.rb b/test/visitors/test_yast_builder.rb index e73a57b..027764a 100644 --- a/test/visitors/test_yast_builder.rb +++ b/test/visitors/test_yast_builder.rb @@ -28,6 +28,16 @@ module Psych Class.new.to_yaml end end + + def test_hash + assert_round_trip('a' => 'b') + 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)) + end end end end |