spec/beaker/logger_spec.rb in beaker-1.2.0 vs spec/beaker/logger_spec.rb in beaker-1.3.0

- old
+ new

@@ -14,11 +14,11 @@ context 'default for' do its(:destinations) { should include(STDOUT) } its(:color) { should be_nil } - its(:log_level) { should be :normal } + its(:log_level) { should be :info } end end context 'it can' do @@ -55,11 +55,11 @@ end context 'at debug log_level' do subject( :debug_logger ) { Logger.new( my_io, - :debug => true, + :log_level => 'debug', :quiet => true, :color => true ) } its( :is_debug? ) { should be_true } @@ -78,39 +78,37 @@ it( 'errors' ) { debug_logger.error 'ERROR!' } it( 'host_output' ) { debug_logger.host_output 'ERROR!' } end end - context 'at normal log_level' do - subject( :normal_logger ) { Logger.new( my_io, + context 'at info log_level' do + subject( :info_logger ) { Logger.new( my_io, :quiet => true, :color => true ) } its( :is_debug? ) { should be_false } - its( :is_warn? ) { should be_false } context 'skip' do before do my_io.should_not_receive :puts my_io.should_not_receive :print end - it( 'warnings' ) { normal_logger.warn 'NOT A WARNING!' } - it( 'debugs' ) { normal_logger.debug 'NOT DEBUGGING!' } + it( 'debugs' ) { info_logger.debug 'NOT DEBUGGING!' } end context 'but print' do before do my_io.should_receive :puts my_io.should_receive( :print ).twice end - it( 'successes' ) { normal_logger.success 'SUCCESS!' } - it( 'notifications' ) { normal_logger.notify 'NOTFIY!' } - it( 'errors' ) { normal_logger.error 'ERROR!' } + it( 'successes' ) { info_logger.success 'SUCCESS!' } + it( 'notifications' ) { info_logger.notify 'NOTFIY!' } + it( 'errors' ) { info_logger.error 'ERROR!' } end end end end end