diff options
Diffstat (limited to 'test/visitors/test_emitter.rb')
-rw-r--r-- | test/visitors/test_emitter.rb | 13 |
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 |