diff options
Diffstat (limited to 'test/logger/test_severity.rb')
-rw-r--r-- | test/logger/test_severity.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/logger/test_severity.rb b/test/logger/test_severity.rb index f17a392829..8889a1dc52 100644 --- a/test/logger/test_severity.rb +++ b/test/logger/test_severity.rb @@ -13,4 +13,15 @@ class TestLoggerSeverity < Test::Unit::TestCase end assert_equal(levels.size, Logger::Severity.constants.size) end + + def test_level_assignment + logger = Logger.new(nil) + + Logger::Severity.constants.each do |level| + next if level == :UNKNOWN + + logger.send("#{level.downcase}!") + assert(logger.level) == Logger::Severity.const_get(level) + end + end end |