discourse/spec/support/fake_logger.rb
Joffrey JAFFEUX 3b874f1b2d
DEV: prevents heisentest in processor spec (#12066)
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.
2021-02-12 14:53:36 +01:00

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