diff options
author | David RodrÃguez <[email protected]> | 2025-06-03 10:49:16 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-06-05 19:12:36 +0900 |
commit | 21bce66f59c449896005fed26d5559184d11abf0 (patch) | |
tree | 99df0e025ece03b67a0d6f8def3799a6c959ee18 | |
parent | 9f112afcde513489b9b44b77bd2bd66843388dfb (diff) |
[rubygems/rubygems] Reset variables that can cause specs to fail if set
https://github.com/rubygems/rubygems/commit/8df67b7322
-rw-r--r-- | spec/bundler/spec_helper.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/bundler/spec_helper.rb b/spec/bundler/spec_helper.rb index 56f20999fd..beb26ea052 100644 --- a/spec/bundler/spec_helper.rb +++ b/spec/bundler/spec_helper.rb @@ -9,12 +9,14 @@ if File.expand_path(__FILE__) =~ %r{([^\w/\.:\-])} abort "The bundler specs cannot be run from a path that contains special characters (particularly #{$1.inspect})" end -# Bundler CLI will have different help text depending on whether this variable -# is set, since the `-e` flag `bundle gem` with require an explicit value if -# `EDITOR` is not set, but will use `EDITOR` by default is set. So make sure -# it's `nil` before loading bundler to get a consistent help text, since some -# tests rely on that. +# Bundler CLI will have different help text depending on whether any of these +# variables is set, since the `-e` flag `bundle gem` with require an explicit +# value if they are not set, but will use their value by default if set. So make +# sure they are `nil` before loading bundler to get a consistent help text, +# since some tests rely on that. ENV["EDITOR"] = nil +ENV["VISUAL"] = nil +ENV["BUNDLER_EDITOR"] = nil require "bundler" require "rspec/core" |