diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-13 19:58:57 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-13 19:58:57 +0000 |
commit | 1daa0b113d853bfa57b776cc569939b61ca14292 (patch) | |
tree | f8c4acb08a551820299dff2b13966d6ac38d31e4 /test/rubygems/test_gem_dependency_resolver.rb | |
parent | 85995e88d49c442b5b113c2676456133e79f5c02 (diff) | |
download | ruby-1daa0b113d853bfa57b776cc569939b61ca14292.tar.gz |
* lib/rubygems: Update to RubyGems 2.1.3
Fixed installing platform gems
Restored concurrent requires
Fixed installing gems with extensions with --install-dir
Fixed `gem fetch -v` to install the latest version
Fixed installing gems with "./" in their files entries
* test/rubygems/test_gem_package.rb: Tests for the above.
* NEWS: Updated for RubyGems 2.1.3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_dependency_resolver.rb')
-rw-r--r-- | test/rubygems/test_gem_dependency_resolver.rb | 49 |
1 files changed, 3 insertions, 46 deletions
diff --git a/test/rubygems/test_gem_dependency_resolver.rb b/test/rubygems/test_gem_dependency_resolver.rb index 47eef8cc55..08d8e62f2b 100644 --- a/test/rubygems/test_gem_dependency_resolver.rb +++ b/test/rubygems/test_gem_dependency_resolver.rb @@ -15,9 +15,7 @@ class TestGemDependencyResolver < Gem::TestCase exp = expected.sort_by { |s| s.full_name } act = actual.map { |a| a.spec }.sort_by { |s| s.full_name } - msg = "Set of gems was not the same: #{exp.map { |x| x.full_name}.inspect} != #{act.map { |x| x.full_name}.inspect}" - - assert_equal exp, act, msg + assert_equal exp, act end def test_no_overlap_specificly @@ -66,32 +64,6 @@ class TestGemDependencyResolver < Gem::TestCase assert_set [a2], res.resolve end - def test_picks_best_platform - is = Gem::DependencyResolver::IndexSpecification - unknown = Gem::Platform.new 'unknown' - a2_p1 = quick_spec 'a', 2 do |s| s.platform = Gem::Platform.local end - a3_p2 = quick_spec 'a', 3 do |s| s.platform = unknown end - v2 = v(2) - v3 = v(3) - source = Gem::Source.new @gem_repo - - s = set - - a2 = is.new s, 'a', v2, source, Gem::Platform::RUBY - a2_p1 = is.new s, 'a', v2, source, Gem::Platform.local.to_s - a3_p2 = is.new s, 'a', v3, source, unknown - - s.add a3_p2 - s.add a2_p1 - s.add a2 - - ad = make_dep "a" - - res = Gem::DependencyResolver.new([ad], s) - - assert_set [a2_p1], res.resolve - end - def test_only_returns_spec_once a1 = util_spec "a", "1", "c" => "= 1" b1 = util_spec "b", "1", "c" => "= 1" @@ -205,8 +177,7 @@ class TestGemDependencyResolver < Gem::TestCase r.resolve end - assert_equal "Unable to resolve dependency: (unknown) requires a (>= 0)", - e.message + assert_equal "unable to find any gem matching dependency 'a (>= 0)'", e.message assert_equal "a (>= 0)", e.dependency.to_s end @@ -244,7 +215,7 @@ class TestGemDependencyResolver < Gem::TestCase r.resolve end - assert_match "a-1 requires c (>= 2) but it conflicted", e.message + assert_equal "detected 1 conflict with dependency 'c (>= 2)'", e.message assert_equal "c (>= 2)", e.dependency.to_s @@ -353,18 +324,4 @@ class TestGemDependencyResolver < Gem::TestCase assert_set [b1, c1, d2], r.resolve end - - def test_select_local_platforms - r = Gem::DependencyResolver.new nil, nil - - a1 = quick_spec 'a', 1 - a1_p1 = quick_spec 'a', 1 do |s| s.platform = Gem::Platform.local end - a1_p2 = quick_spec 'a', 1 do |s| s.platform = 'unknown' end - - selected = r.select_local_platforms [a1, a1_p1, a1_p2] - - assert_equal [a1, a1_p1], selected - end - end - |