diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-14 03:30:02 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-14 03:30:02 +0000 |
commit | 4de117a61517e839f2c45eaf45d56fc243d6d5b2 (patch) | |
tree | 7cb5af7a7eb513e5dddf5e343746b1611e628387 /lib/rubygems/test_case.rb | |
parent | e548c09d429a5136285ea81aed418685359ed124 (diff) |
* lib/rubygems: Update to RubyGems 2.4.1 master(713ab65)
Complete history at:
https://github.com/rubygems/rubygems/blob/master/History.txt#L3-L216
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/test_case.rb')
-rw-r--r-- | lib/rubygems/test_case.rb | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index 74cb4c98d1..e9916dad61 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -218,8 +218,11 @@ class Gem::TestCase < MiniTest::Unit::TestCase def setup super - @orig_gem_home = ENV['GEM_HOME'] - @orig_gem_path = ENV['GEM_PATH'] + @orig_gem_home = ENV['GEM_HOME'] + @orig_gem_path = ENV['GEM_PATH'] + @orig_gem_vendor = ENV['GEM_VENDOR'] + + ENV['GEM_VENDOR'] = nil @current_dir = Dir.pwd @fetcher = nil @@ -347,8 +350,9 @@ class Gem::TestCase < MiniTest::Unit::TestCase FileUtils.rm_rf @tempdir unless ENV['KEEP_FILES'] - ENV['GEM_HOME'] = @orig_gem_home - ENV['GEM_PATH'] = @orig_gem_path + ENV['GEM_HOME'] = @orig_gem_home + ENV['GEM_PATH'] = @orig_gem_path + ENV['GEM_VENDOR'] = @orig_gem_vendor Gem.ruby = @orig_ruby if @orig_ruby @@ -1263,7 +1267,7 @@ Also, a list: # The StaticSet is a static set of gem specifications used for testing only. # It is available by requiring Gem::TestCase. - class StaticSet + class StaticSet < Gem::Resolver::Set ## # A StaticSet ignores remote because it has a fixed set of gems. @@ -1274,6 +1278,8 @@ Also, a list: # Creates a new StaticSet for the given +specs+ def initialize(specs) + super() + @specs = specs @remote = true @@ -1299,7 +1305,7 @@ Also, a list: # Finds all gems matching +dep+ in this set. def find_all(dep) - @specs.find_all { |s| dep.matches_spec? s } + @specs.find_all { |s| dep.match? s, @prerelease } end ## |