0
@@ -48,8 +48,7 @@ class TestGemDependencyInstaller < RubyGemTestCase
0
si = util_setup_spec_fetcher @a1, @b1, @d1, @d2, @x1_m, @x1_o, @w1, @y1,
0
- FileUtils.rm_rf File.join(@gemhome, 'gems')
0
- Gem.source_index.refresh!
0
@@ -83,6 +82,36 @@ class TestGemDependencyInstaller < RubyGemTestCase
0
assert File.exist?(File.join(@tempdir, 'cache', "#{@b1.full_name}.gem"))
0
+ def test_install_dependencies_satisfied
0
+ a2, a2_gem = util_gem 'a', '2'
0
+ FileUtils.rm_rf File.join(@gemhome, 'gems')
0
+ Gem.source_index.refresh!
0
+ FileUtils.mv @a1_gem, @tempdir
0
+ FileUtils.mv a2_gem, @tempdir # not in index
0
+ FileUtils.mv @b1_gem, @tempdir
0
+ inst = Gem::DependencyInstaller.new
0
+ FileUtils.rm File.join(@tempdir, "#{a2.full_name}.gem")
0
+ inst = Gem::DependencyInstaller.new
0
+ installed = Gem::SourceIndex.from_installed_gems.map { |n,s| s.full_name }
0
+ assert_equal %w[a-2 b-1], installed.sort
0
+ assert_equal %w[b-1], inst.installed_gems.map { |s| s.full_name }
0
def test_install_dependency
0
FileUtils.mv @a1_gem, @tempdir
0
FileUtils.mv @b1_gem, @tempdir
0
@@ -96,7 +125,7 @@ class TestGemDependencyInstaller < RubyGemTestCase
0
assert_equal %w[a-1 b-1], inst.installed_gems.map { |s| s.full_name }
0
- def test_install_
with_development_dependency0
+ def test_install_
dependency_development0
FileUtils.mv @a1_gem, @tempdir
0
FileUtils.mv @aa1_gem, @tempdir
0
FileUtils.mv @b1_gem, @tempdir
0
@@ -393,6 +422,8 @@ class TestGemDependencyInstaller < RubyGemTestCase
0
s.platform = Gem::Platform.new %w[cpu other_platform 1]
0
si = util_setup_spec_fetcher @a1, a2_o
0
@fetcher.data['http://gems.example.com/gems/yaml'] = si.to_yaml
0
@@ -532,6 +563,8 @@ class TestGemDependencyInstaller < RubyGemTestCase
0
b2, = util_gem 'b', '2'
0
c1, = util_gem 'c', '1' do |s| s.add_dependency 'b' end
0
si = util_setup_spec_fetcher @a1, @b1, b2, c1
0
inst = Gem::DependencyInstaller.new
0
@@ -563,6 +596,8 @@ class TestGemDependencyInstaller < RubyGemTestCase
0
def test_gather_dependencies_old_required
0
e1, = util_gem 'e', '1' do |s| s.add_dependency 'd', '= 1' end
0
si = util_setup_spec_fetcher @d1, @d2, e1
0
inst = Gem::DependencyInstaller.new
Comments
No one has commented yet.