diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_exception.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index 05cc109b48..56cd19d0a2 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -1259,6 +1259,12 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| }; end + def test_warning_category + assert_raise(TypeError) {Warning[nil]} + assert_raise(ArgumentError) {Warning[:XXXX]} + assert_include([true, false], Warning[:deprecated]) + end + def test_undefined_backtrace assert_separately([], "#{<<-"begin;"}\n#{<<-"end;"}") begin; |