class WebMock::HttpLibAdapters::PatronAdapter

def self.handle_file_name(req, webmock_response)

def self.handle_file_name(req, webmock_response)
  if req.action == :get && req.file_name
    begin
      File.open(req.file_name, "w") do |f|
        f.write webmock_response.body
      end
    rescue Errno::EACCES
      raise ArgumentError.new("Unable to open specified file.")
    end
  end
end