diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-07-23 08:15:15 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-03 09:29:58 +0900 |
commit | 1b081cdd650964708c700a8051d37bf70e1a3880 (patch) | |
tree | 4882c82b07e45aa798b1c41b3d9f543907e5869d /spec | |
parent | 26f651796c06c232b9887d2401f5e998d6dc654f (diff) | |
download | ruby-1b081cdd650964708c700a8051d37bf70e1a3880.tar.gz |
[bundler/bundler] Improve test to make it more independent from env
https://github.com/bundler/bundler/commit/038f0d7c37
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/runtime/with_unbundled_env_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/bundler/runtime/with_unbundled_env_spec.rb b/spec/bundler/runtime/with_unbundled_env_spec.rb index b901f28c8b..f78cdb5876 100644 --- a/spec/bundler/runtime/with_unbundled_env_spec.rb +++ b/spec/bundler/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 |