# File lib/vcr/http_stubbing_adapters/webmock.rb, line 37 def create_stubs_checkpoint(cassette) checkpoints[cassette] = ::WebMock::StubRegistry.instance.request_stubs.dup end
# File lib/vcr/http_stubbing_adapters/webmock.rb, line 12 def http_connections_allowed=(value) @http_connections_allowed = value update_webmock_allow_net_connect end
# File lib/vcr/http_stubbing_adapters/webmock.rb, line 17 def http_connections_allowed? !!::WebMock::Config.instance.allow_net_connect end
# File lib/vcr/http_stubbing_adapters/webmock.rb, line 21 def ignored_hosts=(hosts) @ignored_hosts = hosts update_webmock_allow_net_connect end
# File lib/vcr/http_stubbing_adapters/webmock.rb, line 41 def restore_stubs_checkpoint(cassette) ::WebMock::StubRegistry.instance.request_stubs = checkpoints.delete(cassette) || super end
# File lib/vcr/http_stubbing_adapters/webmock.rb, line 26 def stub_requests(http_interactions, match_attributes) grouped_responses(http_interactions, match_attributes).each do |request_matcher, responses| stub = ::WebMock.stub_request(request_matcher.method || :any, request_matcher.uri) with_hash = request_signature_hash(request_matcher) stub = stub.with(with_hash) if with_hash.size > 0 stub.to_return(responses.map{ |r| response_hash(r) }) end end
Generated with the Darkfish Rdoc Generator 2.