module LoggerSupport def self.included(base) base.instance_eval do let(:logger) { Boty::Logger.adapter } before do @adapter = Boty::Logger.adapter Boty::Logger.adapter = Boty::Logger::Memory.new end around do |example| example.run end after do Boty::Logger.adapter = @adapter end end end end