Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/raven/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def configure
#
# @example
# evt = Raven::Event.new(:message => "An error")
# Raven.send(evt)
# Raven.send_event(evt)
def send_event(event)
client.send_event(event)
end
Expand Down Expand Up @@ -119,7 +119,7 @@ def capture_type(obj, options = {})
if configuration.async?
configuration.async.call(evt)
else
send(evt)
send_event(evt)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/raven/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
config.http_adapter = [:test, stubs]
end

expect(Raven.logger).to receive(:warn).exactly(2).times
expect(Raven.logger).to receive(:warn).once
expect { Raven.capture_exception(build_exception) }.not_to raise_error

stubs.verify_stubbed_calls
Expand Down
12 changes: 6 additions & 6 deletions spec/raven/raven_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
let(:options) { double("options") }

before do
allow(Raven).to receive(:send)
allow(Raven).to receive(:send_event)
allow(Raven::Event).to receive(:from_message) { event }
allow(Raven::Event).to receive(:from_exception) { event }
end
Expand All @@ -15,7 +15,7 @@

it 'sends the result of Event.capture_message' do
expect(Raven::Event).to receive(:from_message).with(message, options)
expect(Raven).to receive(:send).with(event)
expect(Raven).to receive(:send_event).with(event)

Raven.capture_message(message, options)
end
Expand All @@ -30,7 +30,7 @@

it 'sends the result of Event.capture_message' do
expect(Raven::Event).to receive(:from_message).with(message, options)
expect(Raven).not_to receive(:send).with(event)
expect(Raven).not_to receive(:send_event).with(event)

prior_async = Raven.configuration.async
Raven.configuration.async = lambda { :ok }
Expand All @@ -45,7 +45,7 @@

it 'sends the result of Event.capture_exception' do
expect(Raven::Event).to receive(:from_exception).with(exception, options)
expect(Raven).to receive(:send).with(event)
expect(Raven).to receive(:send_event).with(event)

Raven.capture_exception(exception, options)
end
Expand All @@ -60,7 +60,7 @@

it 'sends the result of Event.capture_exception' do
expect(Raven::Event).to receive(:from_exception).with(exception, options)
expect(Raven).not_to receive(:send).with(event)
expect(Raven).not_to receive(:send_event).with(event)

prior_async = Raven.configuration.async
Raven.configuration.async = lambda { :ok }
Expand All @@ -74,7 +74,7 @@
let(:exception) { build_exception }

it 'sends the result of Event.capture_exception according to the result of should_capture' do
expect(Raven).not_to receive(:send).with(event)
expect(Raven).not_to receive(:send_event).with(event)

prior_should_capture = Raven.configuration.should_capture
Raven.configuration.should_capture = Proc.new { false }
Expand Down