summaryrefslogtreecommitdiff
path: root/spec/support/helpers.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-05-07 23:56:16 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-05-16 15:44:53 -0400
commitd5729d251b54d7272fd1e0d675c37b7ac5618a35 (patch)
tree211709203dde6d3fc932db5d344347fd2fc5ec49 /spec/support/helpers.rb
parent97c8e428318c6dab46ccef5c00d4c096d31d41fe (diff)
downloadbundler-d5729d251b54d7272fd1e0d675c37b7ac5618a35.tar.gz
Previous approach for not walking further up from test folderbetter_test_specific_file_searching
I tried monkeypatching the gemfile finder methods in hax.rb, but that resulted in loading parts of bundler too early, and getting redefinition warnings when loading them again from exe/bundle, resulting in actual errors in some cases. The fix for that required eagerly loading the monkeypatched parts of bundler, but that involves changing lib just for the sake of making existing tests pass, and that's what the original changes intend to avoid. So, I'm just reverting to the previous approach of setting an environment variable just for testing and check that. Reverts 11597fef24274bf1542384512faed697d7f41e3b.
Diffstat (limited to 'spec/support/helpers.rb')
-rw-r--r--spec/support/helpers.rb6
1 files changed, 0 insertions, 6 deletions
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index 0567b26c01..478fe60822 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -313,12 +313,6 @@ module Spec
bundle :lock, opts
end
- # Makes tests that require absence of any Gemfiles pass, even if the running
- # system has a Gemfile further up from the specs folder
- def ensure_no_gemfile
- allow(Bundler::SharedHelpers).to receive(:search_up).and_return(nil)
- end
-
def install_gems(*gems)
options = gems.last.is_a?(Hash) ? gems.pop : {}
gem_repo = options.fetch(:gem_repo) { gem_repo1 }