# File lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb, line 170 def clear_webmock_stubs self.stubs = [] unless self.stubs self.stubs.delete_if {|s| s.instance_variable_get(:@options)[:webmock_stub] } end
# File lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb, line 145 def queue_with_webmock(request) self.clear_webmock_stubs if WebMock::HttpLibAdapters::TyphoeusAdapter.disabled? return queue_without_webmock(request) end request_signature = ::WebMock::HttpLibAdapters::TyphoeusAdapter.build_request_signature(request) ::WebMock::RequestRegistry.instance.requested_signatures.put(request_signature) if webmock_response = ::WebMock::StubRegistry.instance.response_for_request(request_signature) ::WebMock::HttpLibAdapters::TyphoeusAdapter. stub_typhoeus(request_signature, webmock_response, self) webmock_response.raise_error_if_any elsif !WebMock.net_connect_allowed?(request_signature.uri) raise WebMock::NetConnectNotAllowedError.new(request_signature) end queue_without_webmock(request) end
Generated with the Darkfish Rdoc Generator 2.