Recording real requests with WebMock | Arkency Blog

Caveat: it’s global, i.e. it’ll apply to all the test cases you’ll run. If you want it for just one test case, run just a single one.(As far as I tried, there’s no easy way to cleanly make it per-example with an around hook, because that would mean we need to store and restore the list of WebMock callbacks. You can get them from WebMock::CallbackRegistry.callbacks, but I couldn’t find a way to set them back, apart from WebMock::CallbackRegistry.reset which empties the list of callback, which is fine only when there were no other callbacks in the first place.).
Recording real requests with WebMock | Arkency Blog #ruby #rubydeveloper #rubyonrails #blog #recording #webmock https://rubyonrails.ba/single/recording-real-requests-with-webmock-arkency-blog

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles