Sha256: 79e2a8c270c1c0816649ccd3747fa300b64dfdcf6685a90dfbf4d9f5aca71940

Contents?: true

Size: 273 Bytes

Versions: 4

Compression:

Stored size: 273 Bytes

Contents

require "webmock/minitest"

WebMock.disable_net_connect!

def WebMock.requests
  @requests ||= []
end

WebMock.after_request do |request, _response|
  WebMock.requests << request
end

module Minitest
  class Test
    setup do
      WebMock.requests.clear
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
minitest-utils-0.4.4 lib/minitest/utils/setup/webmock.rb
minitest-utils-0.4.3 lib/minitest/utils/setup/webmock.rb
minitest-utils-0.4.2 lib/minitest/utils/setup/webmock.rb
minitest-utils-0.4.1 lib/minitest/utils/setup/webmock.rb