[前][次][番号順一覧][スレッド一覧]

ruby-changes:27097

From: drbrain <ko1@a...>
Date: Fri, 8 Feb 2013 11:06:08 +0900 (JST)
Subject: [ruby-changes:27097] drbrain:r39149 (trunk): * test/rubygems/test_gem_dependency_installer.rb: Improve coverage of

drbrain	2013-02-08 10:58:59 +0900 (Fri, 08 Feb 2013)

  New Revision: 39149

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39149

  Log:
    * test/rubygems/test_gem_dependency_installer.rb:  Improve coverage of
      --install-dir feature of gem install.

  Modified files:
    trunk/ChangeLog
    trunk/test/rubygems/test_gem_dependency_installer.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39148)
+++ ChangeLog	(revision 39149)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Feb  8 10:44:44 2013  Eric Hodel  <drbrain@s...>
+
+	* test/rubygems/test_gem_dependency_installer.rb:  Improve coverage of
+	  --install-dir feature of gem install.
+
 Fri Feb  8 10:11:09 2013  Eric Hodel  <drbrain@s...>
 
 	* lib/rubygems/config_file.rb:  Add missing require for
Index: test/rubygems/test_gem_dependency_installer.rb
===================================================================
--- test/rubygems/test_gem_dependency_installer.rb	(revision 39148)
+++ test/rubygems/test_gem_dependency_installer.rb	(revision 39149)
@@ -500,16 +500,21 @@ class TestGemDependencyInstaller < Gem:: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_dependency_installer.rb#L500
     util_setup_gems
 
     FileUtils.mv @a1_gem, @tempdir
+    FileUtils.mv @b1_gem, @tempdir
+
+    inst = Gem::Installer.new @a1.file_name
+    inst.install
+
     gemhome2 = File.join @tempdir, 'gemhome2'
     Dir.mkdir gemhome2
     inst = nil
 
     Dir.chdir @tempdir do
       inst = Gem::DependencyInstaller.new :install_dir => gemhome2
-      inst.install 'a'
+      inst.install 'b'
     end
 
-    assert_equal %w[a-1], inst.installed_gems.map { |s| s.full_name }
+    assert_equal %w[a-1 b-1], inst.installed_gems.map { |s| s.full_name }
 
     assert File.exist?(File.join(gemhome2, 'specifications', @a1.spec_name))
     assert File.exist?(File.join(gemhome2, 'cache', @a1.file_name))

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]