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: test_gem_security_signer.rb
    path of file: ./repos/jruby/test/mri/rubygems
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
require_relative 'helper'

unless Gem::HAVE_OPENSSL
  warn 'Skipping Gem::Security::Signer tests.  openssl not found.'
end

class TestGemSecuritySigner < Gem::TestCase
  ALTERNATE_KEY  = load_key 'alternate'
  CHILD_KEY      = load_key 'child'
  GRANDCHILD_KEY = load_key 'grandchild'

  CHILD_CERT      = load_cert 'child'
  GRANDCHILD_CERT = load_cert 'grandchild'
  E
    
  def test_initialize_default
    FileUtils.mkdir_p File.join(Gem.user_home, '.gem')

    private_key_path = File.join Gem.user_home, '.gem', 'gem-private_key.pem'
    Gem::Security.write PRIVATE_KEY, private_key_path

    public_cert_path = File.join Gem.user_home, '.gem', 'gem-public_cert.pem'
    Gem::Security.write PUBLIC_CERT, public_cert_path

    signer = Gem::Security::Signer.new nil, nil

    assert_equal PRIVATE_KEY.to_pem, signer.key.to_pem
    assert_equal [PUBLIC_CERT.to_pem], signer.cert_chain.map {|c| c.to_pem }
  end