1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
drbrain 2013-11-12 00:16:41 +00:00
parent 8f3934261a
commit 44d0a6dcd7
45 changed files with 1068 additions and 906 deletions

View file

@ -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