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

require_relative "helper"
require "rubygems/deprecate"

class TestGemDeprecate < Ge
    
  def test_rubygems_deprecate_command
    require "rubygems/command"
    foo_command = Class.new(Gem::Command) do
      extend Gem::Deprecate

      rubygems_deprecate_command

      def execute
        puts "pew pew!"
      end
    end

    Gem::Commands.send(:const_set, :FooCommand, foo_command)
    assert Gem::Commands::FooCommand.new("foo").deprecated?
  ensure
    Gem::Commands.send(:remove_const, :FooCommand)
  end