diff options
author | Bundlerbot <bot@bundler.io> | 2019-11-29 20:07:40 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2019-11-29 20:07:40 +0000 |
commit | 4367f9ada53f72537309987772f48d357bbd5e72 (patch) | |
tree | a39259db7f9532cfc6850d954923d4cd7bcc1de3 /spec | |
parent | 8b5bd053b0333c1537f60e2d14a1045234999b8f (diff) | |
parent | 014d3d0663d07e6e517ac60ad7b9b017c5dc9d2d (diff) | |
download | bundler-4367f9ada53f72537309987772f48d357bbd5e72.tar.gz |
Merge #7418
7418: Restore previous BUNDLE_GEMFILE in bundler/inline r=deivid-rodriguez a=fatkodima
[Without spacing changes](https://github.com/bundler/bundler/pull/7418/files?w=1)
Closes #7159
Co-authored-by: fatkodima <fatkodima123@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/runtime/inline_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/runtime/inline_spec.rb b/spec/runtime/inline_spec.rb index afb9c3d180..94d8b086a2 100644 --- a/spec/runtime/inline_spec.rb +++ b/spec/runtime/inline_spec.rb @@ -316,4 +316,21 @@ RSpec.describe "bundler/inline#gemfile" do expect(err).to be_empty end + + it "preserves previous BUNDLE_GEMFILE value" do + ENV["BUNDLE_GEMFILE"] = "" + script <<-RUBY + gemfile do + source "#{file_uri_for(gem_repo1)}" + gem "rack" + end + + puts "BUNDLE_GEMFILE is empty" if ENV["BUNDLE_GEMFILE"].empty? + system("#{Gem.ruby} -w -e '42'") # this should see original value of BUNDLE_GEMFILE + exit $?.exitstatus + RUBY + + expect(last_command).to be_success + expect(out).to include("BUNDLE_GEMFILE is empty") + end end |