Exception: WebMock::NetConnectNotAllowedError
- Inherits:
-
Exception
- Object
- Exception
- WebMock::NetConnectNotAllowedError
- Defined in:
- lib/webmock/errors.rb
Instance Method Summary collapse
-
#initialize(request_signature) ⇒ NetConnectNotAllowedError
constructor
A new instance of NetConnectNotAllowedError.
Constructor Details
#initialize(request_signature) ⇒ NetConnectNotAllowedError
Returns a new instance of NetConnectNotAllowedError.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/webmock/errors.rb', line 4 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 |