mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 09:48:06 +08:00
DEV: Remove the use of stubs on Rails.logger
in our test suite.
This commit is contained in:
16
spec/support/fake_logger.rb
Normal file
16
spec/support/fake_logger.rb
Normal file
@ -0,0 +1,16 @@
|
||||
class FakeLogger
|
||||
attr_reader :warnings, :errors
|
||||
|
||||
def initialize
|
||||
@warnings = []
|
||||
@errors = []
|
||||
end
|
||||
|
||||
def warn(message)
|
||||
@warnings << message
|
||||
end
|
||||
|
||||
def error(message)
|
||||
@errors << message
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user