spec/log_spec.rb in lookout-rack-utils-1.2.1 vs spec/log_spec.rb in lookout-rack-utils-1.2.2

- old
+ new

@@ -10,9 +10,19 @@ configatron.logging.enabled = false configatron.logging.file = "log" end describe '.debug' do + context 'if debug is in configatron.statsd.exclude_levels' do + before { configatron.statsd.exclude_levels = [:debug] } + after { configatron.statsd.exclude_levels = [] } + + it 'should not log a graphite stat' do + Lookout::Rack::Utils::Graphite.should_not_receive(:increment).with('log.debug') + log.debug 'foo' + end + end + it 'should log a graphite stat' do Lookout::Rack::Utils::Graphite.should_receive(:increment).with('log.debug') log.debug 'foo' end end