summaryrefslogtreecommitdiff
path: root/test/test_psych.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-10-08 15:24:56 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-10-08 15:24:56 -0700
commitbe5a4cb845025170c0a8b843faa478989e499f51 (patch)
tree19f7808d8269230df5a2108abe44de6badfc1557 /test/test_psych.rb
parent57c468a5f8bd3ffc1cb93b07db6b823872316a18 (diff)
downloadpsych-be5a4cb845025170c0a8b843faa478989e499f51.zip
supporting load documents
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