summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-23 08:15:15 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-23 11:22:59 +0200
commit038f0d7c37b8a3f0a3faeac87b4c7b02fd40c22a (patch)
tree44c3049e72fda8da884528d8b150e3dd92b86fdd
parent3e5d4b2c421e8d24cd53cb38e4e3f1b875f2b387 (diff)
downloadbundler-038f0d7c37b8a3f0a3faeac87b4c7b02fd40c22a.tar.gz
Improve test to make it more independent from env
-rw-r--r--spec/runtime/with_unbundled_env_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/runtime/with_unbundled_env_spec.rb b/spec/runtime/with_unbundled_env_spec.rb
index b901f28c8b..f78cdb5876 100644
--- a/spec/runtime/with_unbundled_env_spec.rb
+++ b/spec/runtime/with_unbundled_env_spec.rb
@@ -76,11 +76,12 @@ RSpec.describe "Bundler.with_env helpers" do
expect(last_command.stdboth).not_to include("-rbundler/setup")
end
- it "should clean up RUBYLIB", :ruby_repo do
+ it "should restore RUBYLIB", :ruby_repo do
code = "print #{modified_env}['RUBYLIB']"
ENV["RUBYLIB"] = root.join("lib").to_s + File::PATH_SEPARATOR + "/foo"
+ ENV["BUNDLER_ORIG_RUBYLIB"] = root.join("lib").to_s + File::PATH_SEPARATOR + "/foo-original"
bundle_exec_ruby! code.dump
- expect(last_command.stdboth).to include("/foo")
+ expect(last_command.stdboth).to include("/foo-original")
end
it "should restore the original MANPATH" do