diff --git a/activesupport/test/logger_test.rb b/activesupport/test/logger_test.rb index c7a89f676d718..73680f423eb50 100644 --- a/activesupport/test/logger_test.rb +++ b/activesupport/test/logger_test.rb @@ -76,7 +76,7 @@ def test_should_log_debugging_message_when_debugging def test_should_not_log_debug_messages_when_log_level_is_info @logger.level = Logger::INFO @logger.add(Logger::DEBUG, @message) - assert_not @output.string.include?(@message) + assert_not_includes @output.string, @message end def test_should_add_message_passed_as_block_when_using_add @@ -140,7 +140,7 @@ def test_silencing_everything_but_errors @logger.error "THIS IS HERE" end - assert_not @output.string.include?("NOT THERE") + assert_not_includes @output.string, "NOT THERE" assert_includes @output.string, "THIS IS HERE" end @@ -153,7 +153,7 @@ def test_unsilencing @logger.debug "THIS IS HERE" end - assert_not @output.string.include?("NOT THERE") + assert_not_includes @output.string, "NOT THERE" assert_includes @output.string, "THIS IS HERE" end @@ -172,7 +172,7 @@ def test_logger_silencing_works_for_broadcast assert_includes @output.string, "CORRECT DEBUG" assert_includes @output.string, "CORRECT ERROR" - assert_not @output.string.include?("FAILURE") + assert_not_includes @output.string, "FAILURE" assert_includes another_output.string, "CORRECT DEBUG" assert_includes another_output.string, "CORRECT ERROR" @@ -194,7 +194,7 @@ def test_broadcast_silencing_does_not_break_plain_ruby_logger assert_includes @output.string, "CORRECT DEBUG" assert_includes @output.string, "CORRECT ERROR" - assert_not @output.string.include?("FAILURE") + assert_not_includes @output.string, "FAILURE" assert_includes another_output.string, "CORRECT DEBUG" assert_includes another_output.string, "CORRECT ERROR"