debian-mirror-gitlab/spec/support/helpers/inspect_requests.rb
2018-10-15 14:42:47 +05:30

17 lines
401 B
Ruby

require_relative './wait_for_requests'
module InspectRequests
extend self
include WaitForRequests
def inspect_requests(inject_headers: {})
Gitlab::Testing::RequestInspectorMiddleware.log_requests!(inject_headers)
yield
wait_for_all_requests
Gitlab::Testing::RequestInspectorMiddleware.requests
ensure
Gitlab::Testing::RequestInspectorMiddleware.stop_logging!
end
end