Sha256: 57dd01bdf1e612cece8223978aa5c8ff3cb7d3c3ddc756449fc9ca70ca088c01
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
module Pacto module Logger describe SimpleLogger do before do logger.log logger_lib end subject(:logger) { described_class.instance } let(:logger_lib) { ::Logger.new(StringIO.new) } it 'delegates debug to the logger lib' do logger_lib.should_receive(:debug) logger.debug end it 'delegates info to the logger lib' do logger_lib.should_receive(:info) logger.info end it 'delegates warn to the logger lib' do logger_lib.should_receive(:warn) logger.warn end it 'delegates error to the logger lib' do logger_lib.should_receive(:error) logger.error end it 'delegates fatal to the logger lib' do logger_lib.should_receive(:error) logger.error end it 'has the default log level as error' do expect(logger.level).to eq :error end it 'provides access to the log level' do logger.level = :info expect(logger.level).to eq :info end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pacto-0.3.1 | spec/unit/pacto/logger_spec.rb |