Sha256: 27a5c742b40037f58bb713935c2fd04ac71df383d8d9971ee134be8297e3f8a4

Contents?: true

Size: 415 Bytes

Versions: 32

Compression:

Stored size: 415 Bytes

Contents

RSpec.shared_context 'capture logs' do
  let(:logger) { spy('logger') }
  let(:logs)   { [] }

  before do
    Services.configuration.logger = logger
    allow(logger).to receive(:log) do |message, meta, severity|
      logs << {
        message:  message,
        meta:     meta,
        severity: severity
      }
    end
  end

  after do
    Services.configuration.logger = Services::Logger::Null.new
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
services-9.0.0 spec/support/shared.rb
services-8.0.1 spec/support/shared.rb
services-8.0.0 spec/support/shared.rb
services-7.3.3 spec/support/shared.rb
services-7.3.1 spec/support/shared.rb
services-7.3.0 spec/support/shared.rb
services-7.2.1 spec/support/shared.rb
services-7.2.0 spec/support/shared.rb
services-7.1.2 spec/support/shared.rb
services-7.1.1 spec/support/shared.rb
services-7.1.0 spec/support/shared.rb
services-7.0.3 spec/support/shared.rb
services-7.0.2 spec/support/shared.rb
services-7.0.1 spec/support/shared.rb
services-7.0.0 spec/support/shared.rb
services-6.0.5 spec/support/shared.rb
services-6.0.4 spec/support/shared.rb
services-6.0.3 spec/support/shared.rb
services-6.0.2 spec/support/shared.rb
services-6.0.1 spec/support/shared.rb