We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 772ae6f commit f7b7438Copy full SHA for f7b7438
sentry-ruby/spec/sentry/client_spec.rb
@@ -1,13 +1,5 @@
1
# frozen_string_literal: true
2
3
-class ExceptionWithContext < StandardError
4
- def sentry_context
5
- {
6
- foo: "bar"
7
- }
8
- end
9
-end
10
-
11
RSpec.describe Sentry::Client do
12
subject { Sentry::Client.new(configuration) }
13
@@ -572,8 +564,18 @@ module ExcTag; end
572
564
end
573
565
574
566
context 'when the exception responds to sentry_context' do
567
+ let(:exception_with_context) do
568
+ Class.new(StandardError) do
569
+ def sentry_context
570
+ {
571
+ foo: "bar"
+ }
+ end
575
576
+
577
let(:hash) do
- event = subject.event_from_exception(ExceptionWithContext.new)
578
+ event = subject.event_from_exception(exception_with_context.new)
579
event.to_h
580
581
0 commit comments