diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-04 00:48:31 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-04 00:48:31 +0000 |
commit | ea2a00d785576a7dc45c0f6e965de605929e889d (patch) | |
tree | 567e52888b17aacb404c59eb64519d927fb8894f /lib/rubygems/test_case.rb | |
parent | bd950a75b512a7d6243d1f0bb5e944a06a2e1f94 (diff) |
* lib/rubygems: Update to RubyGems 2.2.2 prerelease to check fixes to
CI.
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/test_case.rb')
-rw-r--r-- | lib/rubygems/test_case.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index fb5f3008e2..328731d4ea 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -115,6 +115,23 @@ class Gem::TestCase < MiniTest::Unit::TestCase assert File.exist?(path), msg end + ## + # Sets the ENABLE_SHARED entry in RbConfig::CONFIG to +value+ and restores + # the original value when the block ends + + def enable_shared value + enable_shared = RbConfig::CONFIG['ENABLE_SHARED'] + RbConfig::CONFIG['ENABLE_SHARED'] = value + + yield + ensure + if enable_shared then + RbConfig::CONFIG['enable_shared'] = enable_shared + else + RbConfig::CONFIG.delete 'enable_shared' + end + end + # TODO: move to minitest def refute_path_exists path, msg = nil msg = message(msg) { "Expected path '#{path}' to not exist" } @@ -1249,10 +1266,17 @@ Also, a list: class StaticSet ## + # A StaticSet ignores remote because it has a fixed set of gems. + + attr_accessor :remote + + ## # Creates a new StaticSet for the given +specs+ def initialize(specs) @specs = specs + + @remote = true end ## |