summaryrefslogtreecommitdiff
path: root/spec/runtime
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-23 08:14:02 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-23 11:23:00 +0200
commit6d3b809695e579f0b64f111e023f47721cad3f30 (patch)
tree34df9557a710dc0bf975557a7e2c6dd3105ce0f4 /spec/runtime
parenta82ad111e5bcd1db2b331cceed0330f453912e61 (diff)
downloadbundler-6d3b809695e579f0b64f111e023f47721cad3f30.tar.gz
Move environment reset to the only test needing it
Diffstat (limited to 'spec/runtime')
-rw-r--r--spec/runtime/with_unbundled_env_spec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/runtime/with_unbundled_env_spec.rb b/spec/runtime/with_unbundled_env_spec.rb
index f78cdb5876..b346df6283 100644
--- a/spec/runtime/with_unbundled_env_spec.rb
+++ b/spec/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