Sha256: 940de19a11a352b575fdfcc4a47d47621c9baed275fd4608e276271dabc77dbd

Contents?: true

Size: 845 Bytes

Versions: 15

Compression:

Stored size: 845 Bytes

Contents

require 'sitehub/middleware/logging/log_wrapper'
class SiteHub
  module Middleware
    module Logging
      describe LogWrapper do
        describe '#write' do
          let(:logger) { double('logger') }
          subject do
            described_class.new(logger)
          end

          context 'logger responds to <<' do
            it 'calls << when writing out the log' do
              message = 'message'
              expect(logger).to receive(:<<).with(message)
              subject.write(message)
            end
          end

          context 'logger responds to write' do
            it 'calls << when writing out the log' do
              message = 'message'
              expect(logger).to receive(:write).with(message)
              subject.write(message)
            end
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sitehub-0.5.0.alpha12 spec/sitehub/middleware/logging/log_wrapper_spec.rb
sitehub-0.4.10 spec/sitehub/middleware/logging/log_wrapper_spec.rb
sitehub-0.5.0.alpha11 spec/sitehub/middleware/logging/log_wrapper_spec.rb
sitehub-0.5.0.alpha10 spec/sitehub/middleware/logging/log_wrapper_spec.rb
sitehub-0.5.0.alpha8 spec/sitehub/middleware/logging/log_wrapper_spec.rb
sitehub-0.5.0.alpha7 spec/sitehub/middleware/logging/log_wrapper_spec.rb
sitehub-0.5.0.alpha6 spec/sitehub/middleware/logging/log_wrapper_spec.rb
sitehub-0.5.0.alpha5 spec/sitehub/middleware/logging/log_wrapper_spec.rb
sitehub-0.5.0.alpha4 spec/sitehub/middleware/logging/log_wrapper_spec.rb
sitehub-0.5.0.alpha3 spec/sitehub/middleware/logging/log_wrapper_spec.rb
sitehub-0.5.0.alpha2 spec/sitehub/middleware/logging/log_wrapper_spec.rb
sitehub-0.4.9 spec/sitehub/middleware/logging/log_wrapper_spec.rb
sitehub-0.4.8 spec/sitehub/middleware/logging/log_wrapper_spec.rb
sitehub-0.4.7 spec/sitehub/middleware/logging/log_wrapper_spec.rb
sitehub-0.4.6 spec/sitehub/middleware/logging/log_wrapper_spec.rb