class Faraday::Adapter::Test::Stub
def headers_match?(request_headers)
def headers_match?(request_headers) if strict_mode headers_with_user_agent = headers.dup.tap do |hs| # NOTE: Set User-Agent in case it's not set when creating Stubs. # Users would not want to set Faraday's User-Agent explicitly. hs[:user_agent] ||= Connection::USER_AGENT end return Set.new(headers_with_user_agent) == Set.new(request_headers) end headers.keys.all? do |key| request_headers[key] == headers[key] end end