summaryrefslogtreecommitdiff
path: root/spec/runtime/with_clean_env_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/runtime/with_clean_env_spec.rb')
-rw-r--r--spec/runtime/with_clean_env_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/runtime/with_clean_env_spec.rb b/spec/runtime/with_clean_env_spec.rb
index 4903891e4b..b05e894484 100644
--- a/spec/runtime/with_clean_env_spec.rb
+++ b/spec/runtime/with_clean_env_spec.rb
@@ -45,6 +45,14 @@ RSpec.describe "Bundler.with_env helpers" do
0 true
EOS
end
+
+ it "removes variables that bundler added" do
+ system_gems :bundler
+ 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 -e #{code.inspect}", :system_bundler => true)
+ expect(out).to eq original
+ end
end
describe "Bundler.clean_env" do