summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-09-28 22:27:59 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-09-28 22:27:59 -0700
commita23403e809e8ddcb6b6cccf8f0169606cd376331 (patch)
treeedf5f7e05c932936155fe5413df16a71bc059afd /test
parenta2c0c115fc7c90c5a59ef941d2bbd6a6627f1b21 (diff)
downloadpsych-a23403e809e8ddcb6b6cccf8f0169606cd376331.zip
raising exception on emitter problems
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