Class: Buildkite::TestCollector::Network

Inherits:
Object
  • Object
show all
Defined in:
lib/buildkite/test_collector/network.rb

Defined Under Namespace

Modules: HTTPPatch, NetHTTPPatch, VCRPatch, WebMockPatch

Class Method Summary collapse

Class Method Details

.configureObject



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/buildkite/test_collector/network.rb', line 58

def self.configure
  if defined?(VCR)
    require "vcr/request_handler"
    VCR::RequestHandler.prepend(VCRPatch)
  end

  if defined?(WebMock)
    WebMock::StubRegistry.prepend(WebMockPatch)
  end

  if defined?(Net) && defined?(Net::HTTP)
    Net::HTTP.prepend(NetHTTPPatch)
  end

  if defined?(HTTP) && defined?(HTTP::Client)
    HTTP::Client.prepend(HTTPPatch)
  end
end