mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fbf59bdbea
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
32 lines
834 B
Ruby
32 lines
834 B
Ruby
require 'test/unit'
|
|
require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
|
|
require 'rubygems/indexer'
|
|
require 'rubygems/commands/generate_index_command'
|
|
|
|
class TestGemCommandsGenerateIndexCommand < RubyGemTestCase
|
|
|
|
def setup
|
|
super
|
|
|
|
@cmd = Gem::Commands::GenerateIndexCommand.new
|
|
@cmd.options[:directory] = @gemhome
|
|
end
|
|
|
|
def test_execute
|
|
use_ui @ui do
|
|
@cmd.execute
|
|
end
|
|
|
|
yaml = File.join @gemhome, 'yaml'
|
|
yaml_z = File.join @gemhome, 'yaml.Z'
|
|
quick_index = File.join @gemhome, 'quick', 'index'
|
|
quick_index_rz = File.join @gemhome, 'quick', 'index.rz'
|
|
|
|
assert File.exist?(yaml), yaml
|
|
assert File.exist?(yaml_z), yaml_z
|
|
assert File.exist?(quick_index), quick_index
|
|
assert File.exist?(quick_index_rz), quick_index_rz
|
|
end
|
|
|
|
end if ''.respond_to? :to_xs
|
|
|