Please sign in to comment.
Allow requests to be stubbed by external libraries (e.g. WebMock or F…
…akeWeb). Previously, direct WebMock/FakeWeb/Typhoeus stubs would be ignored unless VCR was turned off. However, some users have requested that VCR use these stubs if they are set. This enables that. Part of this changes the VCR::Request::Typed interface a little bit; #stubbed? now returns true regardless of how it was stubbed, and #stubbed_by_vcr? should be used to test if VCR stubbed it (vs. #externally_stubbed?). Note that I consider this a bit experimental. I'm not sure I've thought through all the repercussions of this, and I consider this only "semi supported". Closes #146.
- Loading branch information...
Showing with 140 additions and 19 deletions.
- +2 −0 CHANGELOG.md
- +1 −1 features/configuration/debug_logging.feature
- +1 −1 lib/vcr/library_hooks/excon.rb
- +15 −2 lib/vcr/library_hooks/fakeweb.rb
- +5 −1 lib/vcr/library_hooks/typhoeus.rb
- +31 −2 lib/vcr/library_hooks/webmock.rb
- +1 −1 lib/vcr/middleware/faraday.rb
- +10 −2 lib/vcr/request_handler.rb
- +21 −3 lib/vcr/structs.rb
- +31 −1 spec/support/shared_example_groups/hook_into_http_library.rb
- +2 −2 spec/vcr/configuration_spec.rb
- +20 −3 spec/vcr/structs_spec.rb