diff options
author | Andre Arko <andre@arko.net> | 2018-07-09 21:19:44 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2018-07-09 21:19:44 -0700 |
commit | ec39b742f0f6ace27302649ac63a57400fbaf454 (patch) | |
tree | 9c355af752abac25f89f6e933bdd8ca1646841cd | |
parent | b91dd5da08d2e92378e169fe7ebeff20b26b01db (diff) | |
download | bundler-ec39b742f0f6ace27302649ac63a57400fbaf454.tar.gz |
delete non-gem copies of Bundler in site_ruby
-rw-r--r-- | spec/spec_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 228b9e5aa3..1685178a34 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -12,6 +12,13 @@ module Gem end end +# Delete any copies of Bundler that have been dumped into site_ruby without +# a gemspec. RubyGems cannot manage that Bundler, and so our tricks to make +# sure that the correct version of Bundler loads will stop working. +Dir.glob(File.join(RbConfig::CONFIG["sitelibdir"], "bundler*")).each do |f| + FileUtils.rm_rf f +end + begin require File.expand_path("../support/path.rb", __FILE__) spec = Gem::Specification.load(Spec::Path.gemspec.to_s) |