summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/visitors/test_emitter.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/visitors/test_emitter.rb b/test/visitors/test_emitter.rb
index 4361444..e2e14aa 100644
--- a/test/visitors/test_emitter.rb
+++ b/test/visitors/test_emitter.rb
@@ -16,10 +16,16 @@ module Psych
end
def test_document
- s = Nodes::Stream.new
- s.children << Nodes::Document.new([1,1])
+ s = Nodes::Stream.new
+ doc = Nodes::Document.new [1,1]
+ scalar = Nodes::Scalar.new 'hello world'
+
+ doc.children << scalar
+ s.children << doc
+
@visitor.accept s
- assert_equal '', @io.string
+
+ assert_match(/1.1/, @io.string)
end
def test_scalar
@@ -34,6 +40,9 @@ module Psych
assert_match(/hello/, @io.string)
end
+
+ def test_sequence
+ end
end
end
end