summaryrefslogtreecommitdiff
path: root/lib/rubygems/test_case.rb
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/test_case.rb11
1 files changed, 10 insertions, 1 deletions
@@ -25,6 +25,7 @@ unless Gem::Dependency.new('rdoc', '>= 3.10').matching_specs.empty?
gem 'json'
end
require 'minitest/autorun'
require 'rubygems/deprecate'
@@ -222,6 +223,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
@orig_gem_vendor = ENV['GEM_VENDOR']
@orig_gem_spec_cache = ENV['GEM_SPEC_CACHE']
@orig_rubygems_gemdeps = ENV['RUBYGEMS_GEMDEPS']
@orig_rubygems_host = ENV['RUBYGEMS_HOST']
ENV.keys.find_all { |k| k.start_with?('GEM_REQUIREMENT_') }.each do |k|
ENV.delete k
@@ -232,7 +234,12 @@ class Gem::TestCase < MiniTest::Unit::TestCase
@current_dir = Dir.pwd
@fetcher = nil
- @ui = Gem::MockGemUi.new
tmpdir = File.expand_path Dir.tmpdir
tmpdir.untaint
@@ -323,6 +330,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
Gem.loaded_specs.clear
Gem.clear_default_specs
Gem::Specification.unresolved_deps.clear
Gem.configuration.verbose = true
Gem.configuration.update_sources = true
@@ -394,6 +402,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
ENV['GEM_VENDOR'] = @orig_gem_vendor
ENV['GEM_SPEC_CACHE'] = @orig_gem_spec_cache
ENV['RUBYGEMS_GEMDEPS'] = @orig_rubygems_gemdeps
ENV['RUBYGEMS_HOST'] = @orig_rubygems_host
Gem.ruby = @orig_ruby if @orig_ruby