|
11 | 11 | end
|
12 | 12 | end
|
13 | 13 |
|
| 14 | + # Currently not testing the output here |
14 | 15 | context 'with a backend logger' do
|
15 | 16 | before do
|
16 | 17 | @logger = double('logger')
|
17 | 18 | allow(Raven.configuration).to receive(:logger) { @logger }
|
18 | 19 | end
|
19 | 20 |
|
20 |
| - it 'should log fatal messages' do |
21 |
| - expect(@logger).to receive(:add).with(Logger::FATAL, '** [Raven] fatalmsg', 'sentry') |
| 21 | + it 'should log to the provided logger' do |
| 22 | + expect(@logger).to receive(:fatal).with('sentry') |
22 | 23 | subject.fatal 'fatalmsg'
|
23 | 24 | end
|
24 | 25 |
|
25 |
| - it 'should log error messages' do |
26 |
| - expect(@logger).to receive(:add).with(Logger::ERROR, '** [Raven] errormsg', 'sentry') |
27 |
| - subject.error 'errormsg' |
28 |
| - end |
29 |
| - |
30 |
| - it 'should log warning messages' do |
31 |
| - expect(@logger).to receive(:add).with(Logger::WARN, '** [Raven] warnmsg', 'sentry') |
32 |
| - subject.warn 'warnmsg' |
33 |
| - end |
34 |
| - |
35 |
| - it 'should log info messages' do |
36 |
| - expect(@logger).to receive(:add).with(Logger::INFO, '** [Raven] infomsg', 'sentry') |
37 |
| - subject.info 'infomsg' |
38 |
| - end |
39 |
| - |
40 |
| - it 'should log debug messages' do |
41 |
| - expect(@logger).to receive(:add).with(Logger::DEBUG, '** [Raven] debugmsg', 'sentry') |
42 |
| - subject.debug 'debugmsg' |
43 |
| - end |
44 |
| - |
45 | 26 | it 'should log messages from blocks' do
|
46 |
| - expect(@logger).to receive(:add).with(Logger::INFO, '** [Raven] infoblock', 'sentry') |
| 27 | + expect(@logger).to receive(:info).with('sentry') |
47 | 28 | subject.info { 'infoblock' }
|
48 | 29 | end
|
49 | 30 | end
|
|
0 commit comments