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:
parent
8f3934261a
commit
44d0a6dcd7
45 changed files with 1068 additions and 906 deletions
|
@ -160,6 +160,37 @@ class TestGemRequestSet < Gem::TestCase
|
|||
assert_equal %w!c-2 b-2 a-2!, names
|
||||
end
|
||||
|
||||
def test_install
|
||||
spec_fetcher do |fetcher|
|
||||
fetcher.gem "a", "1", "b" => "= 1"
|
||||
fetcher.gem "b", "1"
|
||||
|
||||
fetcher.clear
|
||||
end
|
||||
|
||||
rs = Gem::RequestSet.new
|
||||
rs.gem 'a'
|
||||
|
||||
rs.resolve
|
||||
|
||||
reqs = []
|
||||
installers = []
|
||||
|
||||
installed = rs.install({}) do |req, installer|
|
||||
reqs << req
|
||||
installers << installer
|
||||
end
|
||||
|
||||
assert_equal %w[b-1 a-1], reqs.map { |req| req.full_name }
|
||||
assert_equal %w[b-1 a-1],
|
||||
installers.map { |installer| installer.spec.full_name }
|
||||
|
||||
assert_path_exists File.join @gemhome, 'specifications', 'a-1.gemspec'
|
||||
assert_path_exists File.join @gemhome, 'specifications', 'b-1.gemspec'
|
||||
|
||||
assert_equal %w[b-1 a-1], installed.map { |s| s.full_name }
|
||||
end
|
||||
|
||||
def test_install_into
|
||||
spec_fetcher do |fetcher|
|
||||
fetcher.gem "a", "1", "b" => "= 1"
|
||||
|
@ -173,8 +204,8 @@ class TestGemRequestSet < Gem::TestCase
|
|||
|
||||
installed = rs.install_into @tempdir
|
||||
|
||||
assert File.exists?(File.join(@tempdir, "specifications", "a-1.gemspec"))
|
||||
assert File.exists?(File.join(@tempdir, "specifications", "b-1.gemspec"))
|
||||
assert_path_exists File.join @tempdir, 'specifications', 'a-1.gemspec'
|
||||
assert_path_exists File.join @tempdir, 'specifications', 'b-1.gemspec'
|
||||
|
||||
assert_equal %w!b-1 a-1!, installed.map { |s| s.full_name }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue