summaryrefslogtreecommitdiff
path: root/test/psych/test_stream.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/psych/test_stream.rb')
-rw-r--r--test/psych/test_stream.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/psych/test_stream.rb b/test/psych/test_stream.rb
index 9b71c6d996..ae940d1ee4 100644
--- a/test/psych/test_stream.rb
+++ b/test/psych/test_stream.rb
@@ -54,6 +54,14 @@ module Psych
assert_equal %w{ foo bar }, list
end
+ def test_safe_load_stream_yields_documents
+ list = []
+ Psych.safe_load_stream("--- foo\n...\n--- bar") do |ruby|
+ list << ruby
+ end
+ assert_equal %w{ foo bar }, list
+ end
+
def test_load_stream_break
list = []
Psych.load_stream("--- foo\n...\n--- `") do |ruby|