Sha256: 8fd9e2e7751aaf7cacba13a38e4ed6f6552f94061ab9670a8043441287644cd6

Contents?: true

Size: 304 Bytes

Versions: 4

Compression:

Stored size: 304 Bytes

Contents

# frozen_string_literal: true

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.8 lib/minitest/utils/setup/webmock.rb
minitest-utils-0.4.7 lib/minitest/utils/setup/webmock.rb
minitest-utils-0.4.6 lib/minitest/utils/setup/webmock.rb
minitest-utils-0.4.5 lib/minitest/utils/setup/webmock.rb