aboutsummaryrefslogtreecommitdiffstats
path: root/test/rake
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-12 14:57:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-12 14:57:33 +0000
commit05c29680e515c000552008f725747261ffa6008d (patch)
tree4ad6c4c057ec68f3d7b396a8fa55022f45ee274c /test/rake
parent31eb1938832eb3a3a69c7246db151c96b589b877 (diff)
downloadruby-05c29680e515c000552008f725747261ffa6008d.tar.gz
fix env leaks
* lib/rubygems/test_case.rb (setup, teardown): fix environment variable change leaks. * test/cgi/update_env.rb: ditto. * test/rake/test_rake_application_options.rb (setup, teardown): ditto. * test/rake/test_rake_file_utils.rb (setup, teardown): ditto. * test/rubygems/test_gem_request.rb (setup): add https_proxy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rake')
-rw-r--r--test/rake/test_rake_application_options.rb2
-rw-r--r--test/rake/test_rake_file_utils.rb5
2 files changed, 7 insertions, 0 deletions
diff --git a/test/rake/test_rake_application_options.rb b/test/rake/test_rake_application_options.rb
index 1914240590..250302685d 100644
--- a/test/rake/test_rake_application_options.rb
+++ b/test/rake/test_rake_application_options.rb
@@ -7,6 +7,7 @@ class TestRakeApplicationOptions < Rake::TestCase
def setup
super
+ @testkey = ENV['TESTKEY']
clear_argv
Rake::FileUtilsExt.verbose_flag = false
Rake::FileUtilsExt.nowrite_flag = false
@@ -14,6 +15,7 @@ class TestRakeApplicationOptions < Rake::TestCase
end
def teardown
+ ENV['TESTKEY'] = @testkey
clear_argv
Rake::FileUtilsExt.verbose_flag = false
Rake::FileUtilsExt.nowrite_flag = false
diff --git a/test/rake/test_rake_file_utils.rb b/test/rake/test_rake_file_utils.rb
index 37d33dc39a..90e01dfbf8 100644
--- a/test/rake/test_rake_file_utils.rb
+++ b/test/rake/test_rake_file_utils.rb
@@ -3,10 +3,15 @@ require 'fileutils'
require 'stringio'
class TestRakeFileUtils < Rake::TestCase
+ def setup
+ super
+ @rake_test_sh = ENV['RAKE_TEST_SH']
+ end
def teardown
FileUtils::LN_SUPPORTED[0] = true
RakeFileUtils.verbose_flag = Rake::FileUtilsExt::DEFAULT
+ ENV['RAKE_TEST_SH'] = @rake_test_sh
super
end