Sha256: 7062a575a1f230336bacc770412fc22ee04dbc5800adfc1d4ad497d9c83b4fe1

Contents?: true

Size: 838 Bytes

Versions: 1

Compression:

Stored size: 838 Bytes

Contents

require 'minitest/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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubygems-update-1.3.1 test/test_gem_commands_generate_index_command.rb