diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-07-23 08:14:02 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-03 09:29:58 +0900 |
commit | 55831647fbea0005449f714eec7672fab50cf9d3 (patch) | |
tree | 7d6bd84f9b60a4795d4b04e886f5515acb963f33 /spec/bundler/runtime | |
parent | 679472454832f4e9b5c72f282b2933c44ef35ffa (diff) | |
download | ruby-55831647fbea0005449f714eec7672fab50cf9d3.tar.gz |
[bundler/bundler] Move environment reset to the only test needing it
https://github.com/bundler/bundler/commit/6d3b809695
Diffstat (limited to 'spec/bundler/runtime')
-rw-r--r-- | spec/bundler/runtime/with_unbundled_env_spec.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/bundler/runtime/with_unbundled_env_spec.rb b/spec/bundler/runtime/with_unbundled_env_spec.rb index f78cdb5876..b346df6283 100644 --- a/spec/bundler/runtime/with_unbundled_env_spec.rb +++ b/spec/bundler/runtime/with_unbundled_env_spec.rb @@ -54,6 +54,8 @@ RSpec.describe "Bundler.with_env helpers" do end it "removes variables that bundler added", :ruby_repo do + ENV.replace(ENV.to_hash.delete_if {|k, _v| k.start_with?(Bundler::EnvironmentPreserver::BUNDLER_PREFIX) }) + original = ruby!('puts ENV.to_a.map {|e| e.join("=") }.sort.join("\n")') code = 'puts Bundler.original_env.to_a.map {|e| e.join("=") }.sort.join("\n")' bundle_exec_ruby! code.dump |