summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/visitors/test_to_ruby.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/visitors/test_to_ruby.rb b/test/visitors/test_to_ruby.rb
index c295caf..c7caf47 100644
--- a/test/visitors/test_to_ruby.rb
+++ b/test/visitors/test_to_ruby.rb
@@ -34,6 +34,20 @@ module Psych
doc.children << Nodes::Scalar.new('foo')
assert_equal 'foo', doc.to_ruby
end
+
+ def test_stream
+ a = Nodes::Document.new
+ a.children << Nodes::Scalar.new('foo')
+
+ b = Nodes::Document.new
+ b.children << Nodes::Scalar.new('bar')
+
+ stream = Nodes::Stream.new
+ stream.children << a
+ stream.children << b
+
+ assert_equal %w{ foo bar }, stream.to_ruby
+ end
end
end
end