Exception: WebMock::NetConnectNotAllowedError

Inherits:
Exception
  • Object
show all
Defined in:
lib/webmock/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(request_signature) ⇒ NetConnectNotAllowedError

Returns a new instance of NetConnectNotAllowedError.



6
7
8
9
10
11
12
13
14
15
# File 'lib/webmock/errors.rb', line 6

def initialize(request_signature)
  request_signature_snippet = RequestSignatureSnippet.new(request_signature)
  text = [
    "Real HTTP connections are disabled. Unregistered request: #{request_signature}",
    request_signature_snippet.stubbing_instructions,
    request_signature_snippet.request_stubs,
    "="*60
  ].compact.join("\n\n")
  super(text)
end