We usually rely on VCR Show archive.org snapshot and WebMock Show archive.org snapshot to prevent any real network connection when running our unit tests.
This is not entirely true: They are both limited to a set of HTTP libraries listed below (as of 2022). Direct calls to Kernel#open
or OpenURI#open_uri
are not mocked and will trigger real network requests even in tests. This might bite you e.g. in
older versions of CarrierWave
Show archive.org snapshot
with remote file URLs.