2 require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
3 require 'rubygems/package'
4 require 'rubygems/security'
5 require 'rubygems/commands/fetch_command'
7 class TestGemCommandsFetchCommand < RubyGemTestCase
12 @cmd = Gem::Commands::FetchCommand.new
16 util_setup_fake_fetcher
18 @fetcher.data["#{@gem_repo}/Marshal.#{@marshal_version}"] =
20 @fetcher.data["#{@gem_repo}/gems/#{@a2.full_name}.gem"] =
21 File.read(File.join(@gemhome, 'cache', "#{@a2.full_name}.gem"))
23 @cmd.options[:args] = [@a2.name]
31 assert File.exist?(File.join(@tempdir, "#{@a2.full_name}.gem"))