diff options
-rw-r--r-- | test/rubygems/test_gem_resolver.rb | 132 |
1 files changed, 130 insertions, 2 deletions
@@ -13,6 +13,12 @@ class TestGemResolver < Gem::TestCase end def set(*specs) StaticSet.new(specs) end @@ -20,7 +26,7 @@ class TestGemResolver < Gem::TestCase actual = resolver.resolve 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}" @@ -123,6 +129,30 @@ class TestGemResolver < Gem::TestCase assert_equal ['b (= 2)'], reqs.to_a.map { |req| req.to_s } end def test_requests_ignore_dependencies a1 = util_spec 'a', 1, 'b' => 2 @@ -140,6 +170,104 @@ class TestGemResolver < Gem::TestCase assert_empty reqs end def test_no_overlap_specificly a = util_spec "a", '1' b = util_spec "b", "1" @@ -215,7 +343,7 @@ class TestGemResolver < Gem::TestCase res = Gem::Resolver.new([ad], s) - assert_resolves_to [a2_p1], res end def test_only_returns_spec_once |