diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-08 01:32:18 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-08 01:32:18 +0000 |
commit | c00e84327f14845bd484e76b5ee5dfeb1fa9ce3d (patch) | |
tree | 9f558dafa363f4f0118d504a50cd4461e2821cd1 /lib/rubygems/test_case.rb | |
parent | 6b05153a3a75b74b64553d6a46f501d9ee0f0376 (diff) |
Merge rubygems master.
This is RC version of Rubygems 2.7.0.
https://github.com/rubygems/rubygems/commit/688fb7e83c13c3fe7c2bb03c49a2db4c82852aee
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/test_case.rb')
-rw-r--r-- | lib/rubygems/test_case.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index fee6875ef0..efc78edea2 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -25,6 +25,7 @@ unless Gem::Dependency.new('rdoc', '>= 3.10').matching_specs.empty? gem 'json' end +require 'bundler' 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_bundle_gemfile = ENV['BUNDLE_GEMFILE'] @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 + + Bundler.ui = Bundler::UI::Silent.new + @ui = Gem::MockGemUi.new + # This needs to be a new instance since we call use_ui(@ui) when we want to + # capture output + Gem::DefaultUserInteraction.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 + Bundler.reset! 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['BUNDLE_GEMFILE'] = @orig_bundle_gemfile ENV['RUBYGEMS_HOST'] = @orig_rubygems_host Gem.ruby = @orig_ruby if @orig_ruby |