summaryrefslogtreecommitdiff
path: root/lib/rubygems
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-03 13:07:57 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-03 13:07:57 +0000
commit7ad690313b3b274b2c527ab26d341f69fb09dbd5 (patch)
tree783b178eabf2b9e09b89487b901e217eac7c2108 /lib/rubygems
parent259f84169874b627431e70131e1ce6c478dd2504 (diff)
* lib/rubygems/test_case.rb: Refix for test-all in separate directory.
r31147 + r31151. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems')
-rw-r--r--lib/rubygems/test_case.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb
index 3b26d31611..7923fac7ed 100644
--- a/lib/rubygems/test_case.rb
+++ b/lib/rubygems/test_case.rb
@@ -103,7 +103,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
undef_method :default_test if instance_methods.include? 'default_test' or
instance_methods.include? :default_test
- @@project_dir = Dir.pwd
+ @@project_dir = Dir.pwd unless defined?(@@project_dir)
##
# #setup prepares a sandboxed location to install gems. All installs are
@@ -122,6 +122,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
@orig_gem_home = ENV['GEM_HOME']
@orig_gem_path = ENV['GEM_PATH']
+ @current_dir = Dir.pwd
@ui = Gem::MockGemUi.new
tmpdir = nil
@@ -228,7 +229,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
Gem::RemoteFetcher.fetcher = nil
end
- Dir.chdir @@project_dir
+ Dir.chdir @current_dir
FileUtils.rm_rf @tempdir unless ENV['KEEP_FILES']