summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-09-29 19:45:21 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-09-29 19:45:21 -0700
commitc95dbd52c43493ed5a56f2b6098fff4a02bd9e8c (patch)
tree4fe0f0ca247e1e9cc56afcb13e676007989066fa /test
parent6c4ab641b15252929046dcf169750e49cf148f63 (diff)
downloadpsych-c95dbd52c43493ed5a56f2b6098fff4a02bd9e8c.zip
adding object method, transforming scalars
Diffstat (limited to 'test')
-rw-r--r--test/visitors/test_yast_builder.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/visitors/test_yast_builder.rb b/test/visitors/test_yast_builder.rb
new file mode 100644
index 0000000..0e29f94
--- /dev/null
+++ b/test/visitors/test_yast_builder.rb
@@ -0,0 +1,15 @@
+require 'minitest/autorun'
+require 'psych'
+
+module Psych
+ module Visitors
+ class TestYASTBuilder < MiniTest::Unit::TestCase
+ def test_scalar
+ v = Visitors::YASTBuilder.new
+ v.accept 'foo'
+
+ assert_equal 'foo', Psych.load(v.tree.to_yaml)
+ end
+ end
+ end
+end