mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 10:13:45 +08:00
3b874f1b2d
This test failure was caused by rails calling `.debug` on our FakeLogger which was not supporting it, resulting in more errors than what the test was expecting.
37 lines
493 B
Ruby
37 lines
493 B
Ruby
# frozen_string_literal: true
|
|
|
|
class FakeLogger
|
|
attr_reader :warnings, :errors, :infos, :fatals
|
|
|
|
def initialize
|
|
@warnings = []
|
|
@errors = []
|
|
@debug = []
|
|
@infos = []
|
|
@fatals = []
|
|
end
|
|
|
|
def info(message = nil)
|
|
@infos << message
|
|
end
|
|
|
|
def warn(message)
|
|
@warnings << message
|
|
end
|
|
|
|
def error(message)
|
|
@errors << message
|
|
end
|
|
|
|
def fatal(message)
|
|
@fatals << message
|
|
end
|
|
|
|
def debug(message)
|
|
@debug << message
|
|
end
|
|
|
|
def formatter
|
|
end
|
|
end
|