-
Notifications
You must be signed in to change notification settings - Fork 68
How can I silence Authority.logger in test environment? #101
Comments
Hi, Nate! Authority expects to have its logger set to an object that is or acts like an instance of Logger - specifically, that responds to So you could make your own dummy object, if you like: o = Object.new
def o.warn(*args)
# do nothing
end ...but a more typical way to do it would be (at least on a Linix or Mac system) would be to use If you ran the Rails generator, you can look in What you tried to do looks sensible, but doesn't work because config = Authority.configuration
config.logger = my_logger
Authority.configuration = config but that doesn't have any effect, because after the first call, the |
I just pushed a commit to master to make this easier - want to try it out and let me know what you think? |
Thank you for the quick response. I’ll try out master and see how it goes. |
Closing - let me know if you have further questions or issues. |
See version 3.1.0 |
That is just what I was looking for. Thanks! |
Can I add something to my spec_helper.rb file to silence the Authority logging output?
I tried
Authority.logger = nil
but that isn’t possible. Any other ideas?The text was updated successfully, but these errors were encountered: