~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to test/rubygems/test_gem_commands_generate_index_command.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
require_relative 'gemutilities'
 
1
require 'rubygems/test_case'
2
2
require 'rubygems/indexer'
3
3
require 'rubygems/commands/generate_index_command'
4
4
 
5
 
class TestGemCommandsGenerateIndexCommand < RubyGemTestCase
 
5
class TestGemCommandsGenerateIndexCommand < Gem::TestCase
6
6
 
7
7
  def setup
8
8
    super
16
16
      @cmd.execute
17
17
    end
18
18
 
19
 
    yaml = File.join @gemhome, 'yaml'
20
 
    yaml_z = File.join @gemhome, 'yaml.Z'
21
 
    quick_index = File.join @gemhome, 'quick', 'index'
22
 
    quick_index_rz = File.join @gemhome, 'quick', 'index.rz'
 
19
    marshal = File.join @gemhome, 'Marshal.4.8'
 
20
    marshal_z = File.join @gemhome, 'Marshal.4.8.Z'
23
21
 
24
 
    assert File.exist?(yaml), yaml
25
 
    assert File.exist?(yaml_z), yaml_z
26
 
    assert File.exist?(quick_index), quick_index
27
 
    assert File.exist?(quick_index_rz), quick_index_rz
 
22
    assert File.exist?(marshal), marshal
 
23
    assert File.exist?(marshal_z), marshal_z
28
24
  end
29
25
 
30
26
  def test_execute_rss_update
33
29
    @cmd.options[:rss_gems_host] = 'gems.example.com'
34
30
 
35
31
    use_ui @ui do
36
 
      assert_raises MockGemUi::TermError do
 
32
      assert_raises Gem::MockGemUi::TermError do
37
33
        @cmd.execute
38
34
      end
39
35
    end