You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: default_current_user_provider_spec.rb
    path of file: ./repos/discourse/spec/lib/auth
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

RSpec.describe Auth::DefaultCurrentUserProvider do
  # careful using
    
  def get_cookie_info(cookie_jar, name)
    headers = {}
    cookie_jar.always_write_cookie = true
    cookie_jar.write(headers)

    header = headers["Set-Cookie"]
    return if header.nil?

    info = {}

    line = header.split("\n").find { |l| l.start_with?("#{name}=") }
    parts = line.split(";").map(&:strip)

    info[:value] = parts.shift.split("=")[1]
    parts.each do |p|
      key, value = p.split("=")
      info[key.downcase.to_sym] = value || true
    end

    info
  end