diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-28 22:27:59 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-28 22:27:59 -0700 |
commit | a23403e809e8ddcb6b6cccf8f0169606cd376331 (patch) | |
tree | edf5f7e05c932936155fe5413df16a71bc059afd /test | |
parent | a2c0c115fc7c90c5a59ef941d2bbd6a6627f1b21 (diff) | |
download | psych-a23403e809e8ddcb6b6cccf8f0169606cd376331.zip |
raising exception on emitter problems
Diffstat (limited to 'test')
-rw-r--r-- | test/visitors/test_emitter.rb | 15 |
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 |