summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/visitors/test_yast_builder.rb10
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