summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-01-03 16:23:07 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-01-03 16:23:07 -0800
commit53907513fd879d67896f2b87041be9c5f92259bb (patch)
tree6a195087b978b982feb9218dd832c82cdf2069a2 /test
parent50eb0f3abbcc423b583c7a23a0a74620b6623342 (diff)
downloadpsych-53907513fd879d67896f2b87041be9c5f92259bb.zip
supporting io objects in the parse method
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_parser.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/psych/test_parser.rb b/test/psych/test_parser.rb
index 9c257a3..d6d81ef 100644
--- a/test/psych/test_parser.rb
+++ b/test/psych/test_parser.rb
@@ -25,6 +25,13 @@ module Psych
@parser = Psych::Parser.new EventCatcher.new
end
+ def test_parse_io
+ @parser.parse StringIO.new("--- a")
+ assert_called :start_stream
+ assert_called :scalar
+ assert_called :end_stream
+ end
+
def test_syntax_error
assert_raises(Psych::SyntaxError) do
@parser.parse("---\n\"foo\"\n\"bar\"\n")