my test code is like below, but it keep saying that method 'info' has already been hooked
Spy.on(Rails.logger, [:debug, :info, :error].freeze)
Error:
xxxx::xxxx:
Spy::AlreadyHookedError: #<ActiveSupport::Logger:0x00007f8f70d28488> method 'info' has already been hooked
test/xxxx.rb:8:in `block (2 levels) in <module:xxxxxx>'
4904 tests, 13087 assertions, 0 failures, 1 errors, 0 skips
any idea how to fix this?