File: errors.rb

package info (click to toggle)
ruby-webmock 3.25.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,172 kB
  • sloc: ruby: 12,829; makefile: 6
file content (19 lines) | stat: -rw-r--r-- 505 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module WebMock

  class NetConnectNotAllowedError < Exception
    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

  end

end