summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_parser.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/psych/test_parser.rb b/test/psych/test_parser.rb
index 187bace..13d4376 100644
--- a/test/psych/test_parser.rb
+++ b/test/psych/test_parser.rb
@@ -33,9 +33,19 @@ module Psych
assert_called :start_stream
end
- def test_start_document_implicit
+ def test_end_document_implicit
+ @parser.parse("\"foo\"\n")
+ assert_called :end_document, [true]
+ end
+
+ def test_end_document_explicit
@parser.parse("\"foo\"\n")
- assert_called :start_document, [[], [], true]
+ assert_called :end_document, [true]
+ end
+
+ def test_start_document_implicit
+ @parser.parse("\"foo\"\n...")
+ assert_called :end_document, [false]
end
def test_start_document_version