webmock icon indicating copy to clipboard operation
webmock copied to clipboard

Is there a verbose mode?

Open Epigene opened this issue 3 years ago • 1 comments
trafficstars

I'm disabling real requests before each example in RSpec suite, and mocking requests to Sentry like so

stub_request(:any, /sentry\.io/).to_return(status: 200, body: "", headers: {})

Unfortunately, I'm still getting some errors like this:

ERROR -- Real HTTP connections are disabled. Unregistered request: POST https://o73877.ingest.sentry.io/api/5263014/envelope/ with body ...

Is there a verbose mode that would output the backtrace of the place that's making the request?

Epigene avatar Mar 15 '22 09:03 Epigene

@Epigene : I was having the same issue. I ran RSpec with bin/rspec [...] --backtrace. Then, when the test failed, I saw the full backtrace that had generated the unregistered HTTP request.

davidrunger avatar Jun 05 '22 16:06 davidrunger