summaryrefslogtreecommitdiff
path: root/test/test_psych.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_psych.rb')
-rw-r--r--test/test_psych.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_psych.rb b/test/test_psych.rb
index 96d0f69..690bf23 100644
--- a/test/test_psych.rb
+++ b/test/test_psych.rb
@@ -10,4 +10,12 @@ class TestPsych < MiniTest::Unit::TestCase
assert Psych.libyaml_version
assert_equal Psych.libyaml_version.join('.'), Psych::LIBYAML_VERSION
end
+
+ def test_load_documents
+ docs = []
+ Psych.load_documents("--- foo\n...\n--- bar\n...") { |doc|
+ docs << doc
+ }
+ assert_equal %w{ foo bar }, docs
+ end
end