summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-09-28 22:02:10 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-09-28 22:02:10 -0700
commit0f174ee584cd1755819becf1da74e0c010049542 (patch)
tree906eb279f6adc666673c8068da335ff01b822708 /test
parent780b789a2fb985ac8ae24eab21eb939293524542 (diff)
downloadpsych-0f174ee584cd1755819becf1da74e0c010049542.zip
scalars converted to yaml
Diffstat (limited to 'test')
-rw-r--r--test/visitors/test_emitter.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/visitors/test_emitter.rb b/test/visitors/test_emitter.rb
index a6b8f25..3c93cc7 100644
--- a/test/visitors/test_emitter.rb
+++ b/test/visitors/test_emitter.rb
@@ -21,6 +21,19 @@ module Psych
@visitor.accept s
assert_equal '', @io.string
end
+
+ def test_scalar
+ s = Nodes::Stream.new
+ doc = Nodes::Document.new
+ scalar = Nodes::Scalar.new 'hello'
+
+ doc.children << scalar
+ s.children << doc
+
+ @visitor.accept s
+
+ assert_match(/hello/, @io.string)
+ end
end
end
end