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_commands_fetch_command.rb
    path of file: ./repos/ruby-packer/ruby/test/rubygems
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
require 'rubygems/test_case'
require 'rubygems/package'
require 'rubygems/security'
require 'rubygems/commands/fetch_command'

class TestGemCommandsFetchCommand < Gem::Te
    
  def test_execute_prerelease
    specs = spec_fetcher do |fetcher|
      fetcher.gem 'a', 2
      fetcher.gem 'a', '2.a'
    end

    @cmd.options[:args] = %w[a]
    @cmd.options[:prerelease] = true

    use_ui @ui do
      Dir.chdir @tempdir do
        @cmd.execute
      end
    end

    a2 = specs['a-2']

    assert_path_exists(File.join(@tempdir, a2.file_name),
                       "#{a2.full_name} not fetched")
  end