aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_update_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_update_command.rb
parent9c4ef4b191a1e6b9abdbb21c7c709d1d0f2397e6 (diff)
downloadruby-effdbf5936cc090a618e13c8f9a1b5412ebab2fa.tar.gz
* 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_update_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_update_command.rb74
1 files changed, 22 insertions, 52 deletions
diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb
index 6a327068e2..03894d7590 100644
--- a/test/rubygems/test_gem_commands_update_command.rb
+++ b/test/rubygems/test_gem_commands_update_command.rb
@@ -18,11 +18,9 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
@cmd.options[:document] = []
@specs = spec_fetcher do |fetcher|
- fetcher.gem 'a', 1
- fetcher.gem 'a', 2
- fetcher.gem 'a', '3.a'
-
- fetcher.clear
+ fetcher.download 'a', 1
+ fetcher.download 'a', 2
+ fetcher.download 'a', '3.a'
end
@a1_path = @specs['a-1'].cache_file
@@ -32,10 +30,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
def test_execute
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
-
- fetcher.clear
-
+ fetcher.download 'a', 2
fetcher.spec 'a', 1
end
@@ -54,10 +49,8 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
def test_execute_multiple
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
- fetcher.gem 'ab', 2
-
- fetcher.clear
+ fetcher.download 'a', 2
+ fetcher.download 'ab', 2
fetcher.spec 'a', 1
fetcher.spec 'ab', 1
@@ -78,9 +71,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
def test_execute_system
spec_fetcher do |fetcher|
- fetcher.gem 'rubygems-update', 9 do |s| s.files = %w[setup.rb] end
-
- fetcher.clear
+ fetcher.download 'rubygems-update', 9 do |s| s.files = %w[setup.rb] end
end
@cmd.options[:args] = []
@@ -100,11 +91,9 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
def test_execute_system_at_latest
spec_fetcher do |fetcher|
- fetcher.gem 'rubygems-update', Gem::VERSION do |s|
+ fetcher.download 'rubygems-update', Gem::VERSION do |s|
s.files = %w[setup.rb]
end
-
- fetcher.clear
end
@cmd.options[:args] = []
@@ -123,10 +112,8 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
def test_execute_system_multiple
spec_fetcher do |fetcher|
- fetcher.gem 'rubygems-update', 8 do |s| s.files = %w[setup.rb] end
- fetcher.gem 'rubygems-update', 9 do |s| s.files = %w[setup.rb] end
-
- fetcher.clear
+ fetcher.download 'rubygems-update', 8 do |s| s.files = %w[setup.rb] end
+ fetcher.download 'rubygems-update', 9 do |s| s.files = %w[setup.rb] end
end
@cmd.options[:args] = []
@@ -146,10 +133,8 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
def test_execute_system_specific
spec_fetcher do |fetcher|
- fetcher.gem 'rubygems-update', 8 do |s| s.files = %w[setup.rb] end
- fetcher.gem 'rubygems-update', 9 do |s| s.files = %w[setup.rb] end
-
- fetcher.clear
+ fetcher.download 'rubygems-update', 8 do |s| s.files = %w[setup.rb] end
+ fetcher.download 'rubygems-update', 9 do |s| s.files = %w[setup.rb] end
end
@cmd.options[:args] = []
@@ -169,10 +154,8 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
def test_execute_system_specifically_to_latest_version
spec_fetcher do |fetcher|
- fetcher.gem 'rubygems-update', 8 do |s| s.files = %w[setup.rb] end
- fetcher.gem 'rubygems-update', 9 do |s| s.files = %w[setup.rb] end
-
- fetcher.clear
+ fetcher.download 'rubygems-update', 8 do |s| s.files = %w[setup.rb] end
+ fetcher.download 'rubygems-update', 9 do |s| s.files = %w[setup.rb] end
end
@cmd.options[:args] = []
@@ -213,11 +196,9 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
def test_execute_dependencies
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2, 'b' => 2, 'c' => 2
- fetcher.gem 'b', 2
- fetcher.gem 'c', 2
-
- fetcher.clear
+ fetcher.download 'a', 2, 'b' => 2, 'c' => 2
+ fetcher.download 'b', 2
+ fetcher.download 'c', 2
fetcher.spec 'a', 1, 'c' => '1.2'
fetcher.spec 'c', '1.2'
@@ -243,10 +224,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
def test_execute_rdoc
skip if RUBY_VERSION <= "1.8.7"
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
-
- fetcher.clear
-
+ fetcher.download 'a', 2
fetcher.spec 'a', 1
end
@@ -269,9 +247,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
def test_execute_named
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
-
- fetcher.clear
+ fetcher.download 'a', 2
fetcher.spec 'a', 1
end
@@ -292,8 +268,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
def test_execute_named_some_up_to_date
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
- fetcher.clear
+ fetcher.download 'a', 2
fetcher.spec 'a', 1
fetcher.spec 'b', 2
@@ -334,9 +309,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
def test_execute_named_up_to_date_prerelease
spec_fetcher do |fetcher|
- fetcher.gem 'a', '3.a'
-
- fetcher.clear
+ fetcher.download 'a', '3.a'
fetcher.gem 'a', 2
end
@@ -376,10 +349,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
def test_execute_user_install
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
-
- fetcher.clear
-
+ fetcher.download 'a', 2
fetcher.spec 'a', 1
end