diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-01-09 18:58:03 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-01-09 18:58:03 -0800 |
commit | c4fbedc83020eef1a6143f7d64b3c0c748f5d9e5 (patch) | |
tree | f51af7b07ced6c59bf9da54d48aab3499ef05e92 /test | |
parent | e8de67f073935e7bd314a42778cee31e7c062833 (diff) | |
download | psych-c4fbedc83020eef1a6143f7d64b3c0c748f5d9e5.zip |
fixing warnings, testing start sequence
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_emitter.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/test/psych/test_emitter.rb b/test/psych/test_emitter.rb index 7ffcea9..6153088 100644 --- a/test/psych/test_emitter.rb +++ b/test/psych/test_emitter.rb @@ -37,7 +37,7 @@ module Psych [[], [nil,nil], false], ].each do |args| assert_raises(TypeError) do - @emitter.start_document *args + @emitter.start_document(*args) end end end @@ -53,9 +53,22 @@ module Psych ['foo', nil, nil, false, true, :foo], ].each do |args| assert_raises(TypeError) do - @emitter.scalar *args + @emitter.scalar(*args) end end end + + def test_start_sequence_arg_error + @emitter.start_stream Psych::Nodes::Stream::UTF8 + @emitter.start_document [], [], false + + assert_raises(TypeError) do + @emitter.start_sequence(nil, Object.new, true, 1) + end + + assert_raises(TypeError) do + @emitter.start_sequence(nil, nil, true, :foo) + end + end end end |