|
5 | 5 | let(:options) { double("options") } |
6 | 6 |
|
7 | 7 | before do |
8 | | - allow(Raven).to receive(:send) |
| 8 | + allow(Raven).to receive(:send_event) |
9 | 9 | allow(Raven::Event).to receive(:from_message) { event } |
10 | 10 | allow(Raven::Event).to receive(:from_exception) { event } |
11 | 11 | end |
|
15 | 15 |
|
16 | 16 | it 'sends the result of Event.capture_message' do |
17 | 17 | expect(Raven::Event).to receive(:from_message).with(message, options) |
18 | | - expect(Raven).to receive(:send).with(event) |
| 18 | + expect(Raven).to receive(:send_event).with(event) |
19 | 19 |
|
20 | 20 | Raven.capture_message(message, options) |
21 | 21 | end |
|
30 | 30 |
|
31 | 31 | it 'sends the result of Event.capture_message' do |
32 | 32 | expect(Raven::Event).to receive(:from_message).with(message, options) |
33 | | - expect(Raven).not_to receive(:send).with(event) |
| 33 | + expect(Raven).not_to receive(:send_event).with(event) |
34 | 34 |
|
35 | 35 | prior_async = Raven.configuration.async |
36 | 36 | Raven.configuration.async = lambda { :ok } |
|
45 | 45 |
|
46 | 46 | it 'sends the result of Event.capture_exception' do |
47 | 47 | expect(Raven::Event).to receive(:from_exception).with(exception, options) |
48 | | - expect(Raven).to receive(:send).with(event) |
| 48 | + expect(Raven).to receive(:send_event).with(event) |
49 | 49 |
|
50 | 50 | Raven.capture_exception(exception, options) |
51 | 51 | end |
|
60 | 60 |
|
61 | 61 | it 'sends the result of Event.capture_exception' do |
62 | 62 | expect(Raven::Event).to receive(:from_exception).with(exception, options) |
63 | | - expect(Raven).not_to receive(:send).with(event) |
| 63 | + expect(Raven).not_to receive(:send_event).with(event) |
64 | 64 |
|
65 | 65 | prior_async = Raven.configuration.async |
66 | 66 | Raven.configuration.async = lambda { :ok } |
|
74 | 74 | let(:exception) { build_exception } |
75 | 75 |
|
76 | 76 | it 'sends the result of Event.capture_exception according to the result of should_capture' do |
77 | | - expect(Raven).not_to receive(:send).with(event) |
| 77 | + expect(Raven).not_to receive(:send_event).with(event) |
78 | 78 |
|
79 | 79 | prior_should_capture = Raven.configuration.should_capture |
80 | 80 | Raven.configuration.should_capture = Proc.new { false } |
|
0 commit comments