discourse/spec/support/fake_logger.rb

22 lines
296 B
Ruby
Raw Normal View History

class FakeLogger
attr_reader :warnings, :errors, :infos
def initialize
@warnings = []
@errors = []
@infos = []
end
def info(message = nil)
@infos << message
end
def warn(message)
@warnings << message
end
def error(message)
@errors << message
end
end