diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-07-18 19:50:47 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-07-19 16:21:59 -0500 |
commit | 3f91c3572abee43ff50c6ba37af70dfe3a91994d (patch) | |
tree | f222d908d7553ba223ec6dae5732b4e95a14ecee /spec/support/unhax.rb | |
parent | 097b9dfabb80c79843492767f8bb1621c83bba39 (diff) | |
download | bundler-3f91c3572abee43ff50c6ba37af70dfe3a91994d.tar.gz |
YOU get a side effect, and YOU get a side effect, and YOU get a side effectseg-in-process-tests
Diffstat (limited to 'spec/support/unhax.rb')
-rw-r--r-- | spec/support/unhax.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/support/unhax.rb b/spec/support/unhax.rb new file mode 100644 index 0000000000..e856a05b0d --- /dev/null +++ b/spec/support/unhax.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true +Artifice.deactivate if defined?(Artifice) +Gem::Request::ConnectionPools.client = ::Net::HTTP if defined?(Gem::Request::ConnectionPools) +class Gem::RemoteFetcher + @fetcher = nil +end + +class Gem::Platform + @local = nil +end +Gem.platforms.clear + +$bundler_spec_stubbed_constants ||= {} # rubocop:disable Style/GlobalVars +$bundler_spec_stubbed_constants.each do |(mod, const), val| # rubocop:disable Style/GlobalVars + mod.send(:remove_const, const) if mod.send(:const_defined?, const) + mod.send(:const_set, const, val) if val +end +$bundler_spec_stubbed_constants.clear # rubocop:disable Style/GlobalVars + +ENV.delete("BUNDLER_SPEC_ARTIFICE_ENDPOINT") |