aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_dependency_command.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-12 00:16:41 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-12 00:16:41 +0000
commit44d0a6dcd7563526a8b05ccdfa21d9425b94e62b (patch)
treee3bc8e5f1284e65a70c61de9a9d349d5fc8a8640 /test/rubygems/test_gem_commands_dependency_command.rb
parent8f3934261ad4a7f486d2fffa9c961d7535675d8f (diff)
downloadruby-44d0a6dcd7563526a8b05ccdfa21d9425b94e62b.tar.gz
* lib/rubygems: Update to RubyGems master b9213d7. Changes include:
Fixed tests on Windows (I hope) by forcing platform for platform-dependent tests. Fixed File.exists? warnings. Improved testing infrastructure. * test/rubygems: ditto. * test/rdoc/test_rdoc_rubygems_hook.rb: Switch to util_spec like RubyGems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_dependency_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_dependency_command.rb47
1 files changed, 22 insertions, 25 deletions
diff --git a/test/rubygems/test_gem_commands_dependency_command.rb b/test/rubygems/test_gem_commands_dependency_command.rb
index 99b04bcd19..e22b240afe 100644
--- a/test/rubygems/test_gem_commands_dependency_command.rb
+++ b/test/rubygems/test_gem_commands_dependency_command.rb
@@ -8,8 +8,6 @@ class TestGemCommandsDependencyCommand < Gem::TestCase
@cmd = Gem::Commands::DependencyCommand.new
@cmd.options[:domain] = :local
-
- util_setup_fake_fetcher true
end
def test_execute
@@ -30,6 +28,13 @@ class TestGemCommandsDependencyCommand < Gem::TestCase
end
def test_execute_no_args
+ spec_fetcher do |fetcher|
+ fetcher.spec 'a', 1
+ fetcher.spec 'a', '2.a'
+ fetcher.spec 'dep_x', 1, 'x' => '>= 1'
+ fetcher.legacy_platform
+ end
+
@cmd.options[:args] = []
use_ui @ui do
@@ -41,23 +46,11 @@ Gem a-1
Gem a-2.a
-Gem a-2
-
-Gem a-3.a
-
-Gem a_evil-9
-
-Gem b-2
-
-Gem c-1.2
-
Gem dep_x-1
x (>= 1)
Gem pl-1-x86-linux
-Gem x-1
-
EOF
assert_equal expected, @ui.output
@@ -78,7 +71,7 @@ Gem x-1
end
def test_execute_pipe_format
- quick_spec 'foo' do |gem|
+ util_spec 'foo' do |gem|
gem.add_dependency 'bar', '> 1'
end
@@ -94,6 +87,13 @@ Gem x-1
end
def test_execute_regexp
+ spec_fetcher do |fetcher|
+ fetcher.spec 'a', 1
+ fetcher.spec 'a', '2.a'
+ fetcher.spec 'a_evil', 9
+ fetcher.spec 'b', 2
+ end
+
@cmd.options[:args] = %w[/[ab]/]
use_ui @ui do
@@ -105,10 +105,6 @@ Gem a-1
Gem a-2.a
-Gem a-2
-
-Gem a-3.a
-
Gem a_evil-9
Gem b-2
@@ -187,7 +183,10 @@ ERROR: Only reverse dependencies for local gems are supported.
@fetcher = Gem::FakeFetcher.new
Gem::RemoteFetcher.fetcher = @fetcher
- util_setup_spec_fetcher @a1, @a2
+ spec_fetcher do |fetcher|
+ fetcher.spec 'a', 1
+ fetcher.spec 'a', 2
+ end
@cmd.options[:args] = %w[a]
@cmd.options[:domain] = :remote
@@ -202,11 +201,9 @@ ERROR: Only reverse dependencies for local gems are supported.
end
def test_execute_prerelease
- @fetcher = Gem::FakeFetcher.new
- Gem::RemoteFetcher.fetcher = @fetcher
-
- util_clear_gems
- util_setup_spec_fetcher @a2_pre
+ spec_fetcher do |fetcher|
+ fetcher.spec 'a', '2.a'
+ end
@cmd.options[:args] = %w[a]
@cmd.options[:domain] = :remote