Sha256: 70c52befefc77ccec6387f760ce69d6d35a2d9e321b6faae1e279ecb79293264

Contents?: true

Size: 568 Bytes

Versions: 118

Compression:

Stored size: 568 Bytes

Contents

describe KnapsackPro::LoggerWrapper do
  let(:io) { StringIO.new }
  let(:logger) { ::Logger.new(io) }
  let(:logger_wrapper) { described_class.new(logger) }

  subject { io.string }

  [:debug, :info, :warn, :error, :fatal].each do |log_level|
    describe "##{log_level}" do
      before { logger_wrapper.public_send(log_level, 'Test message') }

      it { should include "[knapsack_pro] Test message\n" }
    end
  end

  it 'can set logger level via logger wrapper' do
    logger_wrapper.level = ::Logger::INFO

    expect(logger_wrapper.level).to eq 1
  end
end

Version data entries

118 entries across 118 versions & 1 rubygems

Version Path
knapsack_pro-2.1.1 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-2.1.0 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-2.0.0 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.22.3 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.22.2 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.22.1 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.22.0 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.21.0 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.20.2 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.20.1 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.20.0 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.19.0 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.18.2 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.18.1 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.18.0 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.17.0 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.16.1 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.16.0 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.15.0 spec/knapsack_pro/logger_wrapper_spec.rb
knapsack_pro-1.14.0 spec/knapsack_pro/logger_wrapper_spec.rb