diff options
Diffstat (limited to 'activesupport/test/logger_test.rb')
-rw-r--r-- | activesupport/test/logger_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activesupport/test/logger_test.rb b/activesupport/test/logger_test.rb index eedeca30a8..d2801849ca 100644 --- a/activesupport/test/logger_test.rb +++ b/activesupport/test/logger_test.rb @@ -120,4 +120,14 @@ class LoggerTest < ActiveSupport::TestCase byte_string.force_encoding("ASCII-8BIT") assert byte_string.include?(BYTE_STRING) end + + def test_silencing_everything_but_errors + @logger.silence do + @logger.debug "NOT THERE" + @logger.error "THIS IS HERE" + end + + assert !@output.string.include?("NOT THERE") + assert @output.string.include?("THIS IS HERE") + end end |