Methods
S
T
Instance Public methods
setup()
# File activesupport/test/clean_logger_test.rb, line 6
def setup
  @out = StringIO.new
  @logger = ActiveSupport::Logger.new(@out)
end
test_datetime_format()
# File activesupport/test/clean_logger_test.rb, line 16
def test_datetime_format
  @logger.formatter = Logger::Formatter.new
  @logger.formatter.datetime_format = "%Y-%m-%d"
  @logger.debug 'debug'
  assert_equal "%Y-%m-%d", @logger.formatter.datetime_format
  assert_match(/D, \[\d\d\d\d-\d\d-\d\d#\d+\] DEBUG -- : debug/, @out.string)
end
test_format_message()
# File activesupport/test/clean_logger_test.rb, line 11
def test_format_message
  @logger.error 'error'
  assert_equal "error\n", @out.string
end
test_nonstring_formatting()
# File activesupport/test/clean_logger_test.rb, line 24
def test_nonstring_formatting
  an_object = [1, 2, 3, 4, 5]
  @logger.debug an_object
  assert_equal("#{an_object.inspect}\n", @out.string)
end