rubygems-update 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rubygems-update might be problematic. Click here for more details.

Files changed (78) hide show
  1. data.tar.gz.sig +0 -0
  2. data/ChangeLog +31 -0
  3. data/doc/release_notes/rel_1_3_1.rdoc +75 -0
  4. data/lib/rubygems.rb +23 -13
  5. data/lib/rubygems/commands/check_command.rb +2 -1
  6. data/lib/rubygems/commands/unpack_command.rb +1 -1
  7. data/lib/rubygems/commands/update_command.rb +4 -5
  8. data/lib/rubygems/config_file.rb +4 -1
  9. data/lib/rubygems/custom_require.rb +15 -7
  10. data/lib/rubygems/defaults.rb +5 -0
  11. data/lib/rubygems/installer.rb +1 -1
  12. data/lib/rubygems/rubygems_version.rb +1 -1
  13. data/lib/rubygems/source_index.rb +1 -2
  14. data/lib/rubygems/validator.rb +147 -125
  15. data/test/functional.rb +6 -2
  16. data/test/gem_installer_test_case.rb +1 -1
  17. data/test/gemutilities.rb +19 -5
  18. data/test/test_config.rb +0 -2
  19. data/test/test_gem.rb +4 -4
  20. data/test/test_gem_builder.rb +0 -1
  21. data/test/test_gem_command.rb +2 -3
  22. data/test/test_gem_command_manager.rb +0 -1
  23. data/test/test_gem_commands_build_command.rb +0 -1
  24. data/test/test_gem_commands_cert_command.rb +0 -1
  25. data/test/test_gem_commands_check_command.rb +0 -1
  26. data/test/test_gem_commands_contents_command.rb +2 -3
  27. data/test/test_gem_commands_dependency_command.rb +2 -3
  28. data/test/test_gem_commands_environment_command.rb +1 -2
  29. data/test/test_gem_commands_fetch_command.rb +0 -1
  30. data/test/test_gem_commands_generate_index_command.rb +1 -1
  31. data/test/test_gem_commands_install_command.rb +2 -3
  32. data/test/test_gem_commands_list_command.rb +1 -2
  33. data/test/test_gem_commands_lock_command.rb +1 -2
  34. data/test/test_gem_commands_mirror_command.rb +0 -1
  35. data/test/test_gem_commands_outdated_command.rb +0 -1
  36. data/test/test_gem_commands_pristine_command.rb +1 -2
  37. data/test/test_gem_commands_query_command.rb +5 -6
  38. data/test/test_gem_commands_server_command.rb +0 -1
  39. data/test/test_gem_commands_sources_command.rb +0 -1
  40. data/test/test_gem_commands_specification_command.rb +1 -2
  41. data/test/test_gem_commands_stale_command.rb +0 -1
  42. data/test/test_gem_commands_uninstall_command.rb +5 -4
  43. data/test/test_gem_commands_unpack_command.rb +0 -1
  44. data/test/test_gem_commands_update_command.rb +0 -1
  45. data/test/test_gem_config_file.rb +0 -2
  46. data/test/test_gem_dependency.rb +13 -14
  47. data/test/test_gem_dependency_installer.rb +4 -5
  48. data/test/test_gem_dependency_list.rb +0 -3
  49. data/test/test_gem_digest.rb +12 -10
  50. data/test/test_gem_doc_manager.rb +1 -2
  51. data/test/test_gem_ext_configure_builder.rb +1 -2
  52. data/test/test_gem_ext_ext_conf_builder.rb +2 -3
  53. data/test/test_gem_ext_rake_builder.rb +2 -3
  54. data/test/test_gem_format.rb +4 -6
  55. data/test/test_gem_gem_path_searcher.rb +0 -1
  56. data/test/test_gem_gem_runner.rb +0 -1
  57. data/test/test_gem_indexer.rb +2 -3
  58. data/test/test_gem_install_update_options.rb +1 -2
  59. data/test/test_gem_installer.rb +16 -15
  60. data/test/test_gem_local_remote_options.rb +1 -2
  61. data/test/test_gem_package_tar_reader_entry.rb +5 -5
  62. data/test/test_gem_package_tar_writer.rb +10 -10
  63. data/test/test_gem_platform.rb +6 -19
  64. data/test/test_gem_remote_fetcher.rb +18 -12
  65. data/test/test_gem_requirement.rb +14 -15
  66. data/test/test_gem_server.rb +0 -1
  67. data/test/test_gem_source_index.rb +5 -6
  68. data/test/test_gem_source_info_cache.rb +5 -7
  69. data/test/test_gem_source_info_cache_entry.rb +1 -2
  70. data/test/test_gem_spec_fetcher.rb +0 -1
  71. data/test/test_gem_specification.rb +11 -12
  72. data/test/test_gem_stream_ui.rb +0 -1
  73. data/test/test_gem_validator.rb +4 -5
  74. data/test/test_gem_version.rb +9 -10
  75. data/test/test_gem_version_option.rb +0 -1
  76. data/test/test_kernel.rb +1 -3
  77. metadata +4 -3
  78. metadata.gz.sig +0 -0
@@ -1,4 +1,3 @@
1
- require 'test/unit'
2
1
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
3
2
  require 'rubygems/commands/unpack_command'
4
3
 
@@ -1,4 +1,3 @@
1
- require 'test/unit'
2
1
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
3
2
  require 'rubygems/commands/update_command'
4
3
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby
2
1
  #--
3
2
  # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
4
3
  # All rights reserved.
5
4
  # See LICENSE.txt for permissions.
6
5
  #++
7
6
 
8
- require 'test/unit'
9
7
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
10
8
  require 'rubygems/config_file'
11
9
 
@@ -4,7 +4,6 @@
4
4
  # See LICENSE.txt for permissions.
5
5
  #++
6
6
 
7
- require 'test/unit'
8
7
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
9
8
  require 'rubygems/version'
10
9
 
@@ -70,7 +69,7 @@ class TestGemDependency < RubyGemTestCase
70
69
  end
71
70
 
72
71
  def test_type_is_restricted
73
- assert_raise(ArgumentError) do
72
+ assert_raises ArgumentError do
74
73
  Gem::Dependency.new("pkg", [:sometimes])
75
74
  end
76
75
  end
@@ -79,21 +78,21 @@ class TestGemDependency < RubyGemTestCase
79
78
  assert_equal @pkg1_0, @pkg1_0.dup
80
79
  assert_equal @pkg1_0.dup, @pkg1_0
81
80
 
82
- assert_not_equal @pkg1_0, @pkg1_1, "requirements different"
83
- assert_not_equal @pkg1_1, @pkg1_0, "requirements different"
81
+ refute_equal @pkg1_0, @pkg1_1, "requirements different"
82
+ refute_equal @pkg1_1, @pkg1_0, "requirements different"
84
83
 
85
- assert_not_equal @pkg1_0, @oth1_0, "names different"
86
- assert_not_equal @oth1_0, @pkg1_0, "names different"
84
+ refute_equal @pkg1_0, @oth1_0, "names different"
85
+ refute_equal @oth1_0, @pkg1_0, "names different"
87
86
 
88
- assert_not_equal @pkg1_0, Object.new
89
- assert_not_equal Object.new, @pkg1_0
87
+ refute_equal @pkg1_0, Object.new
88
+ refute_equal Object.new, @pkg1_0
90
89
  end
91
90
 
92
91
  def test_equals2_type
93
92
  runtime = Gem::Dependency.new("pkg", [])
94
93
  development = Gem::Dependency.new("pkg", [], :development)
95
94
 
96
- assert_not_equal(runtime, development)
95
+ refute_equal(runtime, development)
97
96
  end
98
97
 
99
98
  def test_equals_tilde
@@ -123,18 +122,18 @@ class TestGemDependency < RubyGemTestCase
123
122
  assert_equal @pkg1_0.hash, @pkg1_0.dup.hash
124
123
  assert_equal @pkg1_0.dup.hash, @pkg1_0.hash
125
124
 
126
- assert_not_equal @pkg1_0.hash, @pkg1_1.hash, "requirements different"
127
- assert_not_equal @pkg1_1.hash, @pkg1_0.hash, "requirements different"
125
+ refute_equal @pkg1_0.hash, @pkg1_1.hash, "requirements different"
126
+ refute_equal @pkg1_1.hash, @pkg1_0.hash, "requirements different"
128
127
 
129
- assert_not_equal @pkg1_0.hash, @oth1_0.hash, "names different"
130
- assert_not_equal @oth1_0.hash, @pkg1_0.hash, "names different"
128
+ refute_equal @pkg1_0.hash, @oth1_0.hash, "names different"
129
+ refute_equal @oth1_0.hash, @pkg1_0.hash, "names different"
131
130
  end
132
131
 
133
132
  def test_hash_type
134
133
  runtime = Gem::Dependency.new("pkg", [])
135
134
  development = Gem::Dependency.new("pkg", [], :development)
136
135
 
137
- assert_not_equal(runtime.hash, development.hash)
136
+ refute_equal(runtime.hash, development.hash)
138
137
  end
139
138
  end
140
139
 
@@ -1,4 +1,3 @@
1
- require 'test/unit'
2
1
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
3
2
  require 'rubygems/dependency_installer'
4
3
 
@@ -360,7 +359,7 @@ class TestGemDependencyInstaller < RubyGemTestCase
360
359
  Gem.source_index.gems.delete @a1.full_name
361
360
 
362
361
  Dir.chdir @tempdir do
363
- e = assert_raise Gem::InstallError do
362
+ e = assert_raises Gem::InstallError do
364
363
  inst = Gem::DependencyInstaller.new :domain => :local
365
364
  inst.install 'b'
366
365
  end
@@ -498,7 +497,7 @@ class TestGemDependencyInstaller < RubyGemTestCase
498
497
  policy = Gem::Security::HighSecurity
499
498
  inst = Gem::DependencyInstaller.new :security_policy => policy
500
499
 
501
- e = assert_raise Gem::Exception do
500
+ e = assert_raises Gem::Exception do
502
501
  inst.install 'b'
503
502
  end
504
503
 
@@ -516,8 +515,8 @@ class TestGemDependencyInstaller < RubyGemTestCase
516
515
  inst = Gem::DependencyInstaller.new :wrappers => false
517
516
  inst.install 'a'
518
517
 
519
- assert_no_match(%r|This file was generated by RubyGems.|,
520
- File.read(File.join(@gemhome, 'bin', 'a_bin')))
518
+ refute_match(%r|This file was generated by RubyGems.|,
519
+ File.read(File.join(@gemhome, 'bin', 'a_bin')))
521
520
  end
522
521
  end
523
522
 
@@ -1,12 +1,9 @@
1
- #!/usr/bin/env ruby
2
1
  #--
3
2
  # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
4
3
  # All rights reserved.
5
4
  # See LICENSE.txt for permissions.
6
5
  #++
7
6
 
8
-
9
- require 'test/unit'
10
7
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
11
8
  require 'rubygems/dependency_list'
12
9
 
@@ -1,44 +1,46 @@
1
- #!/usr/bin/env ruby
2
1
  #--
3
2
  # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
4
3
  # All rights reserved.
5
4
  # See LICENSE.txt for permissions.
6
5
  #++
7
6
 
8
- require "test/unit"
7
+ require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
9
8
  require "rubygems/digest/md5"
10
9
  require "rubygems/digest/sha1"
11
10
  require "rubygems/digest/sha2"
12
11
 
13
- class TestRubygemsGemDigest < Test::Unit::TestCase
12
+ class TestRubygemsGemDigest < RubyGemTestCase
13
+
14
14
  def test_sha256_hex_digest_works
15
15
  digester = Gem::SHA256.new
16
16
  assert_equal "b5d4045c3f466fa91fe2cc6abe79232a1a57cdf104f7a26e716e0a1e2789df78", digester.hexdigest("ABC")
17
17
  end
18
-
18
+
19
19
  def test_sha256_digest_works
20
20
  digester = Gem::SHA256.new
21
- assert_equal "\265\324\004\\?Fo\251\037\342\314j\276y#*\032W\315\361\004\367\242nqn\n\036'\211\337x",
21
+ assert_equal "\265\324\004\\?Fo\251\037\342\314j\276y#*\032W\315\361\004\367\242nqn\n\036'\211\337x",
22
22
  digester.digest("ABC")
23
23
  end
24
-
24
+
25
25
  def test_sha1_hex_digest_works
26
26
  digester = Gem::SHA1.new
27
27
  assert_equal "3c01bdbb26f358bab27f267924aa2c9a03fcfdb8", digester.hexdigest("ABC")
28
28
  end
29
-
29
+
30
30
  def test_sha1_digest_works
31
31
  digester = Gem::SHA1.new
32
32
  assert_equal "<\001\275\273&\363X\272\262\177&y$\252,\232\003\374\375\270", digester.digest("ABC")
33
33
  end
34
-
34
+
35
35
  def test_md5_hex_digest_works
36
36
  digester = Gem::MD5.new
37
37
  assert_equal "902fbdd2b1df0c4f70b4a5d23525e932", digester.hexdigest("ABC")
38
38
  end
39
-
39
+
40
40
  def test_md5_digest_works
41
41
  digester = Gem::MD5.new
42
42
  assert_equal "\220/\275\322\261\337\fOp\264\245\3225%\3512", digester.digest("ABC")
43
43
  end
44
- end
44
+
45
+ end
46
+
@@ -4,7 +4,6 @@
4
4
  # See LICENSE.txt for permissions.
5
5
  #++
6
6
 
7
- require 'test/unit'
8
7
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
9
8
  require 'rubygems/doc_manager'
10
9
 
@@ -21,7 +20,7 @@ class TestGemDocManager < RubyGemTestCase
21
20
  orig_mode = File.stat(@spec.installation_path).mode
22
21
  File.chmod 0, @spec.installation_path
23
22
 
24
- assert_raise Gem::FilePermissionError do
23
+ assert_raises Gem::FilePermissionError do
25
24
  @manager.uninstall_doc
26
25
  end
27
26
  ensure
@@ -1,4 +1,3 @@
1
- require 'test/unit'
2
1
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
3
2
  require 'rubygems/ext'
4
3
 
@@ -41,7 +40,7 @@ class TestGemExtConfigureBuilder < RubyGemTestCase
41
40
  return if RUBY_PLATFORM =~ /mswin/ # HACK
42
41
  output = []
43
42
 
44
- error = assert_raise Gem::InstallError do
43
+ error = assert_raises Gem::InstallError do
45
44
  Dir.chdir @ext do
46
45
  Gem::Ext::ConfigureBuilder.build nil, nil, @dest_path, output
47
46
  end
@@ -1,4 +1,3 @@
1
- require 'test/unit'
2
1
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
3
2
  require 'rubygems/ext'
4
3
 
@@ -55,7 +54,7 @@ class TestGemExtExtConfBuilder < RubyGemTestCase
55
54
 
56
55
  output = []
57
56
 
58
- error = assert_raise Gem::InstallError do
57
+ error = assert_raises Gem::InstallError do
59
58
  Dir.chdir @ext do
60
59
  Gem::Ext::ExtConfBuilder.build 'extconf.rb', nil, @dest_path, output
61
60
  end
@@ -103,7 +102,7 @@ install:
103
102
  end
104
103
 
105
104
  def test_class_make_no_Makefile
106
- error = assert_raise Gem::InstallError do
105
+ error = assert_raises Gem::InstallError do
107
106
  Dir.chdir @ext do
108
107
  Gem::Ext::ExtConfBuilder.make @ext, ['output']
109
108
  end
@@ -1,4 +1,3 @@
1
- require 'test/unit'
2
1
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
3
2
  require 'rubygems/ext'
4
3
 
@@ -41,7 +40,7 @@ class TestGemExtRakeBuilder < RubyGemTestCase
41
40
  "(in #{realdir})\n"
42
41
  ]
43
42
 
44
- assert_no_match %r%^rake failed:%, output
43
+ refute_match %r%^rake failed:%, output
45
44
  assert_match %r%^#{Regexp.escape @@ruby} mkrf_conf\.rb%, output
46
45
  assert_match %r%^#{Regexp.escape @@rake} RUBYARCHDIR=#{Regexp.escape @dest_path} RUBYLIBDIR=#{Regexp.escape @dest_path}%, output
47
46
  end
@@ -57,7 +56,7 @@ class TestGemExtRakeBuilder < RubyGemTestCase
57
56
 
58
57
  output = []
59
58
 
60
- error = assert_raise Gem::InstallError do
59
+ error = assert_raises Gem::InstallError do
61
60
  build_rake_in do
62
61
  Dir.chdir @ext do
63
62
  Gem::Ext::RakeBuilder.build "mkrf_conf.rb", nil, @dest_path, output
@@ -4,7 +4,6 @@
4
4
  # See LICENSE.txt for permissions.
5
5
  #++
6
6
 
7
- require 'test/unit'
8
7
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
9
8
  require File.join(File.expand_path(File.dirname(__FILE__)), 'simple_gem')
10
9
  require 'rubygems/format'
@@ -36,27 +35,27 @@ class TestGemFormat < RubyGemTestCase
36
35
  end
37
36
 
38
37
  def test_from_file_by_path_nonexistent
39
- assert_raise Gem::Exception do
38
+ assert_raises Gem::Exception do
40
39
  Gem::Format.from_file_by_path '/nonexistent'
41
40
  end
42
41
  end
43
42
 
44
43
  def test_from_io_garbled
45
- e = assert_raise Gem::Package::FormatError do
44
+ e = assert_raises Gem::Package::FormatError do
46
45
  # subtly bogus input
47
46
  Gem::Format.from_io(StringIO.new(@simple_gem.upcase))
48
47
  end
49
48
 
50
49
  assert_equal 'No metadata found!', e.message
51
50
 
52
- e = assert_raise Gem::Package::FormatError do
51
+ e = assert_raises Gem::Package::FormatError do
53
52
  # Totally bogus input
54
53
  Gem::Format.from_io(StringIO.new(@simple_gem.reverse))
55
54
  end
56
55
 
57
56
  assert_equal 'No metadata found!', e.message
58
57
 
59
- e = assert_raise Gem::Package::FormatError do
58
+ e = assert_raises Gem::Package::FormatError do
60
59
  # This was intentionally screws up YAML parsing.
61
60
  Gem::Format.from_io(StringIO.new(@simple_gem.gsub(/:/, "boom")))
62
61
  end
@@ -66,4 +65,3 @@ class TestGemFormat < RubyGemTestCase
66
65
 
67
66
  end
68
67
 
69
-
@@ -1,4 +1,3 @@
1
- require 'test/unit'
2
1
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
3
2
  require 'rubygems/gem_path_searcher'
4
3
 
@@ -1,4 +1,3 @@
1
- require 'test/unit'
2
1
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
3
2
  require 'rubygems/gem_runner'
4
3
 
@@ -4,7 +4,6 @@
4
4
  # See LICENSE.txt for permissions.
5
5
  #++
6
6
 
7
- require 'test/unit'
8
7
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
9
8
 
10
9
  require 'rubygems/indexer'
@@ -217,8 +216,8 @@ Compressing indicies
217
216
  assert_same specs[0].last, specs[1].last,
218
217
  'identical platforms not identical'
219
218
 
220
- assert_not_same specs[1][1], specs[5][1],
221
- 'different versions not different'
219
+ refute_same specs[1][1], specs[5][1],
220
+ 'different versions not different'
222
221
  end
223
222
 
224
223
  def test_generate_index_latest_specs
@@ -1,4 +1,3 @@
1
- require 'test/unit'
2
1
  require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
3
2
  require File.join(File.expand_path(File.dirname(__FILE__)),
4
3
  'gem_installer_test_case')
@@ -31,7 +30,7 @@ class TestGemInstallUpdateOptions < GemInstallerTestCase
31
30
  def test_security_policy_unknown
32
31
  @cmd.add_install_update_options
33
32
 
34
- assert_raise OptionParser::InvalidArgument do
33
+ assert_raises OptionParser::InvalidArgument do
35
34
  @cmd.handle_options %w[-P UnknownSecurity]
36
35
  end
37
36
  end
@@ -52,7 +52,7 @@ load 'my_exec'
52
52
  def test_build_extensions_extconf_bad
53
53
  @spec.extensions << 'extconf.rb'
54
54
 
55
- e = assert_raise Gem::Installer::ExtensionBuildError do
55
+ e = assert_raises Gem::Installer::ExtensionBuildError do
56
56
  use_ui @ui do
57
57
  @installer.build_extensions
58
58
  end
@@ -79,7 +79,7 @@ load 'my_exec'
79
79
  def test_build_extensions_unsupported
80
80
  @spec.extensions << nil
81
81
 
82
- e = assert_raise Gem::Installer::ExtensionBuildError do
82
+ e = assert_raises Gem::Installer::ExtensionBuildError do
83
83
  use_ui @ui do
84
84
  @installer.build_extensions
85
85
  end
@@ -101,7 +101,7 @@ load 'my_exec'
101
101
  assert @installer.ensure_dependency(@spec, dep)
102
102
 
103
103
  dep = Gem::Dependency.new 'b', '> 2'
104
- e = assert_raise Gem::InstallError do
104
+ e = assert_raises Gem::InstallError do
105
105
  @installer.ensure_dependency @spec, dep
106
106
  end
107
107
 
@@ -142,7 +142,7 @@ load 'my_exec'
142
142
  def test_extract_files_bad_dest
143
143
  @installer.gem_dir = 'somedir'
144
144
  @installer.format = nil
145
- e = assert_raise ArgumentError do
145
+ e = assert_raises ArgumentError do
146
146
  @installer.extract_files
147
147
  end
148
148
 
@@ -157,7 +157,7 @@ load 'my_exec'
157
157
 
158
158
  @installer.format = format
159
159
 
160
- e = assert_raise Gem::InstallError do
160
+ e = assert_raises Gem::InstallError do
161
161
  @installer.extract_files
162
162
  end
163
163
 
@@ -175,7 +175,7 @@ load 'my_exec'
175
175
 
176
176
  @installer.format = format
177
177
 
178
- e = assert_raise Gem::InstallError do
178
+ e = assert_raises Gem::InstallError do
179
179
  @installer.extract_files
180
180
  end
181
181
 
@@ -342,8 +342,8 @@ load 'my_exec'
342
342
 
343
343
  assert_match %r|generated by RubyGems|, File.read(installed_exec)
344
344
 
345
- assert_no_match %r|generated by RubyGems|, File.read(real_exec),
346
- 'real executable overwritten'
345
+ refute_match %r|generated by RubyGems|, File.read(real_exec),
346
+ 'real executable overwritten'
347
347
  end
348
348
 
349
349
  def test_generate_bin_symlink
@@ -581,7 +581,7 @@ load 'my_exec'
581
581
  gem_data = File.open gem, 'rb' do |fp| fp.read 1024 end
582
582
  File.open gem, 'wb' do |fp| fp.write gem_data end
583
583
 
584
- e = assert_raise Gem::InstallError do
584
+ e = assert_raises Gem::InstallError do
585
585
  use_ui @ui do
586
586
  @installer = Gem::Installer.new gem
587
587
  @installer.install
@@ -596,7 +596,7 @@ load 'my_exec'
596
596
  util_setup_gem
597
597
 
598
598
  use_ui @ui do
599
- assert_raise Gem::InstallError do
599
+ assert_raises Gem::InstallError do
600
600
  @installer.install
601
601
  end
602
602
  end
@@ -618,8 +618,10 @@ load 'my_exec'
618
618
  @installer = Gem::Installer.new @gem, :install_dir => gemhome2,
619
619
  :source_index => source_index
620
620
 
621
- use_ui @ui do
622
- @installer.install
621
+ build_rake_in do
622
+ use_ui @ui do
623
+ @installer.install
624
+ end
623
625
  end
624
626
 
625
627
  assert File.exist?(File.join(gemhome2, 'gems', @spec.full_name))
@@ -711,7 +713,6 @@ load 'my_exec'
711
713
 
712
714
  build_rake_in do
713
715
  use_ui @ui do
714
- setup
715
716
  util_setup_gem
716
717
  @installer.install
717
718
  end
@@ -738,7 +739,7 @@ load 'my_exec'
738
739
  def test_install_wrong_ruby_version
739
740
  use_ui @ui do
740
741
  installer = Gem::Installer.new old_ruby_required
741
- e = assert_raise Gem::InstallError do
742
+ e = assert_raises Gem::InstallError do
742
743
  installer.install
743
744
  end
744
745
  assert_equal 'old_ruby_required requires Ruby version = 1.4.6',
@@ -757,7 +758,7 @@ load 'my_exec'
757
758
 
758
759
  use_ui @ui do
759
760
  @installer = Gem::Installer.new gem
760
- e = assert_raise Gem::InstallError do
761
+ e = assert_raises Gem::InstallError do
761
762
  @installer.install
762
763
  end
763
764
  assert_equal 'old_rubygems_required requires RubyGems version < 0',