myronmarston/vcr — Issue #112: Ensure the stubbing APIs of FakeWeb/WebMock/Typhoues/Excon/Faraday can still be used
Author: myronmarston
Created: 2011-12-03 21:02:18+00:00
State: open

Sometimes people want to use VCR for some tests and drop down to the stubbing APIs of FakeWeb, WebMock, Typhoeus, Faraday or Excon for a few tests--such as when testing how your code handles a 500 response. You can't really count on recording a transient error like that so it's simpler just to use one of these other libraries to stub the response.

VCR 1.x worked fine here but I think that VCR 2 doesn't work quite as well anymore because of the refactoring. Now VCR hooks into EVERY request and tries to handle it. VCR provides an API to disable it (`VCR.turn_off!` and `VCR.turned_off { ... }`) that I think should work here. This should be tested and documented. Also, VCR is currently monkey patching `WebMock.net_connect_allowed?`, and this monkey patching should be disabled when VCR is turned off.