1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[bundler/bundler] Improve test to make it more independent from env

https://github.com/bundler/bundler/commit/038f0d7c37
This commit is contained in:
David Rodríguez 2019-07-23 08:15:15 +02:00 committed by Hiroshi SHIBATA
parent 26f651796c
commit 1b081cdd65
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -76,11 +76,12 @@ RSpec.describe "Bundler.with_env helpers" do
expect(last_command.stdboth).not_to include("-rbundler/setup") expect(last_command.stdboth).not_to include("-rbundler/setup")
end end
it "should clean up RUBYLIB", :ruby_repo do it "should restore RUBYLIB", :ruby_repo do
code = "print #{modified_env}['RUBYLIB']" code = "print #{modified_env}['RUBYLIB']"
ENV["RUBYLIB"] = root.join("lib").to_s + File::PATH_SEPARATOR + "/foo" 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 bundle_exec_ruby! code.dump
expect(last_command.stdboth).to include("/foo") expect(last_command.stdboth).to include("/foo-original")
end end
it "should restore the original MANPATH" do it "should restore the original MANPATH" do