diff options
author | Bundlerbot <bot@bundler.io> | 2019-04-29 21:58:48 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2019-04-29 21:58:48 +0000 |
commit | 68d6e628e19e1e842bb09d4eb231c3bcff541033 (patch) | |
tree | 26c234b848519fd28b3f99e5c8dd9d7f457949d6 /spec/runtime | |
parent | 896269a45902f587bb722ebbd50dbf1eeee9d25b (diff) | |
parent | 11597fef24274bf1542384512faed697d7f41e3b (diff) | |
download | bundler-68d6e628e19e1e842bb09d4eb231c3bcff541033.tar.gz |
Merge #7138
7138: Remove unnecessary `BUNDLER_SPEC_RUN` env variable r=indirect a=deivid-rodriguez
### What was the end-user problem that led to this PR?
The problem was that our library code contains logic that's only necessary for bundler's specs. I think library code should not contain this kind of code, since it affects end users.
### What is your fix for the problem, implemented in this PR?
My fix is to remove the logic, and instead ensure the specs satisfy what the code wanted to ensure (that specs pass even when there's a Gemfile further up in the directory hierarchy outside of the bundler's development copy).
Co-authored-by: David RodrÃguez <deivid.rodriguez@riseup.net>
Diffstat (limited to 'spec/runtime')
-rw-r--r-- | spec/runtime/load_spec.rb | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/spec/runtime/load_spec.rb b/spec/runtime/load_spec.rb index b74dbde3f6..05ed076b6d 100644 --- a/spec/runtime/load_spec.rb +++ b/spec/runtime/load_spec.rb @@ -45,6 +45,7 @@ RSpec.describe "Bundler.load" do describe "without a gemfile" do it "raises an exception if the default gemfile is not found" do + ensure_no_gemfile expect do Bundler.load end.to raise_error(Bundler::GemfileNotFound, /could not locate gemfile/i) @@ -56,19 +57,6 @@ RSpec.describe "Bundler.load" do Bundler.load end.to raise_error(Bundler::GemfileNotFound, /omg\.rb/) end - - it "does not find a Gemfile above the testing directory" do - bundler_gemfile = tmp.join("../Gemfile") - unless File.exist?(bundler_gemfile) - FileUtils.touch(bundler_gemfile) - @remove_bundler_gemfile = true - end - begin - expect { Bundler.load }.to raise_error(Bundler::GemfileNotFound) - ensure - bundler_gemfile.rmtree if @remove_bundler_gemfile - end - end end describe "when called twice" do |