Sha256: 4b273b5695629ef185aa7c5a74138c99de423a48736db63cdd74d79b41f6312e

Contents?: true

Size: 388 Bytes

Versions: 5

Compression:

Stored size: 388 Bytes

Contents

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

  private

  def change_to_memory_adapter
    @adapter = Boty::Logger.adapter
    Boty::Logger.adapter = Boty::Logger::Memory.new
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
boty-1.0.1 spec/support/logger_support.rb
boty-1.0.0 spec/support/logger_support.rb
boty-0.2.0 spec/support/logger_support.rb
boty-0.1.2 spec/support/logger_support.rb
boty-0.1.1 spec/support/logger_support.rb