diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/buffered_logger_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/test/buffered_logger_test.rb b/activesupport/test/buffered_logger_test.rb index dc6b59aee9..5ce197eba8 100644 --- a/activesupport/test/buffered_logger_test.rb +++ b/activesupport/test/buffered_logger_test.rb @@ -85,6 +85,13 @@ class BufferedLoggerTest < Test::Unit::TestCase assert !@output.string.empty?, @logger.buffer.size end end + + def test_should_know_if_its_loglevel_is_below_a_given_level + ActiveSupport::BufferedLogger::Severity.constants.each do |level| + @logger.level = ActiveSupport::BufferedLogger::Severity.const_get(level) - 1 + assert @logger.send("#{level.downcase}?"), "didn't know if it was #{level.downcase}? or below" + end + end def test_should_auto_flush_every_n_messages @logger.auto_flushing = 5 |