Skip to content

Commit 49aa99c

Browse files
committed
fix(rails): relax spying to make the spec pass under old rails
1 parent a467cd7 commit 49aa99c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sentry-rails/spec/active_job/shared_examples/tracing/instrumentation_resilience.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def perform; end
1717

1818
expect(last_enqueued_payload).not_to be_nil
1919
expect(last_enqueued_payload["_sentry"]).to be_nil
20-
expect(Sentry.sdk_logger).to have_received(:error).with(/failed to inject _sentry payload/)
20+
expect(Sentry.sdk_logger).to have_received(:error).with(/failed to inject _sentry payload/).at_least(:once)
2121
end
2222

2323
it "still runs the job and logs when _sentry extraction raises during deserialize" do
@@ -28,6 +28,6 @@ def perform; end
2828
expect { drain }.not_to raise_error
2929

3030
expect(consumer_transaction).not_to be_nil
31-
expect(Sentry.sdk_logger).to have_received(:error).with(/failed to extract _sentry payload/)
31+
expect(Sentry.sdk_logger).to have_received(:error).with(/failed to extract _sentry payload/).at_least(:once)
3232
end
3333
end

0 commit comments

Comments
 (0)