summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_install_command.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-01 21:50:14 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-01 21:50:14 +0000
commiteffdbf5936cc090a618e13c8f9a1b5412ebab2fa (patch)
treec8410a18cbbe7ad013470fc06fef0c75ce0fd230 /test/rubygems/test_gem_commands_install_command.rb
parent9c4ef4b191a1e6b9abdbb21c7c709d1d0f2397e6 (diff)
* lib/rubygems: Update to RubyGems HEAD(c202db2).
this version contains many enhancements see http://git.io/vtNwF * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_install_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_install_command.rb44
1 files changed, 16 insertions, 28 deletions
diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb
index f03285a..b3062b4 100644
--- a/test/rubygems/test_gem_commands_install_command.rb
+++ b/test/rubygems/test_gem_commands_install_command.rb
@@ -251,8 +251,7 @@ ERROR: Possible alternatives: non_existent_with_hint
correctly_spelled = "nonexistent-with_hint"
spec_fetcher do |fetcher|
- fetcher.spec correctly_spelled, 2
- fetcher.clear
+ fetcher.download correctly_spelled, 2
end
@cmd.options[:args] = [misspelled]
@@ -310,9 +309,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_prerelease_wins_over_previous_ver
spec_fetcher do |fetcher|
- fetcher.gem 'a', 1
- fetcher.gem 'a', '2.a'
- fetcher.clear
+ fetcher.download 'a', 1
+ fetcher.download 'a', '2.a'
end
@cmd.options[:prerelease] = true
@@ -535,9 +533,7 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_conservative
spec_fetcher do |fetcher|
- fetcher.gem 'b', 2
-
- fetcher.clear
+ fetcher.download 'b', 2
fetcher.gem 'a', 2
end
@@ -665,8 +661,7 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_show_source_problems_even_on_success
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
- fetcher.clear
+ fetcher.download 'a', 2
end
Gem.sources << "http://nonexistent.example"
@@ -738,8 +733,7 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_installs_from_a_gemdeps_with_conservative
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
- fetcher.clear
+ fetcher.download 'a', 2
fetcher.gem 'a', 1
end
@@ -763,8 +757,7 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_installs_from_a_gemdeps
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
- fetcher.clear
+ fetcher.download 'a', 2
end
File.open @gemdeps, "w" do |f|
@@ -786,9 +779,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_installs_deps_a_gemdeps
spec_fetcher do |fetcher|
- fetcher.gem 'q', '1.0'
- fetcher.gem 'r', '2.0', 'q' => nil
- fetcher.clear
+ fetcher.download 'q', '1.0'
+ fetcher.download 'r', '2.0', 'q' => nil
end
File.open @gemdeps, "w" do |f|
@@ -813,9 +805,7 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_uses_deps_a_gemdeps
spec_fetcher do |fetcher|
- fetcher.gem 'r', '2.0', 'q' => nil
-
- fetcher.clear
+ fetcher.download 'r', '2.0', 'q' => nil
fetcher.spec 'q', '1.0'
end
@@ -842,9 +832,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_installs_deps_a_gemdeps_into_a_path
spec_fetcher do |fetcher|
- fetcher.gem 'q', '1.0'
- fetcher.gem 'r', '2.0', 'q' => nil
- fetcher.clear
+ fetcher.download 'q', '1.0'
+ fetcher.download 'r', '2.0', 'q' => nil
end
File.open @gemdeps, "w" do |f|
@@ -873,12 +862,11 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_with_gemdeps_path_ignores_system
specs = spec_fetcher do |fetcher|
- fetcher.gem 'q', '1.0'
- fetcher.gem 'r', '2.0', 'q' => nil
- fetcher.clear
+ fetcher.download 'q', '1.0'
+ fetcher.download 'r', '2.0', 'q' => nil
end
- Gem::Specification.add_specs specs['q-1.0']
+ install_specs specs['q-1.0']
File.open @gemdeps, "w" do |f|
f << "gem 'r'"
@@ -910,7 +898,7 @@ ERROR: Possible alternatives: non_existent_with_hint
fetcher.gem 'r', '2.0', 'q' => nil
end
- i = Gem::Installer.new specs['q-1.0'].cache_file, :install_dir => "gf-path"
+ i = Gem::Installer.at specs['q-1.0'].cache_file, :install_dir => "gf-path"
i.install
assert File.file?("gf-path/specifications/q-1.0.gemspec"), "not installed"