Skip to content

Commit e3ded02

Browse files
authored
Fix flaky faraday spec (#2666)
1 parent 818b6c0 commit e3ded02

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sentry-ruby/spec/sentry/faraday_spec.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# frozen_string_literal: true
22

33
require "faraday"
4+
require "contexts/with_request_mock"
5+
46
require_relative "../spec_helper"
57

68
RSpec.describe Sentry::Faraday do
@@ -263,6 +265,8 @@
263265
end
264266

265267
context "when adapter is net/http" do
268+
include_context "with request mock"
269+
266270
let(:http) do
267271
Faraday.new(url) do |f|
268272
f.request :json
@@ -272,7 +276,9 @@
272276

273277
let(:url) { "http://example.com" }
274278

275-
it "skips instrumentation", webmock: false do
279+
it "skips instrumentation" do
280+
stub_normal_response(code: "200")
281+
276282
transaction = Sentry.start_transaction
277283
Sentry.get_current_scope.set_span(transaction)
278284

0 commit comments

Comments
 (0)