summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-26 13:37:51 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-08-07 20:39:16 +0200
commitb29a40820f245a3adefd1bdac1b71065c789f0c9 (patch)
tree095413fe0247afab99179572c4f702723874dffd
parent2ed2bbfdec59b7e0fe51b6701e7a4ed5aeb6affe (diff)
downloadbundler-fix_spec_working_by_chance.tar.gz
Revert "make system_bundle_bin_path helper and resolve failing tests for ruby < 2.6"fix_spec_working_by_chance
This reverts commit e63e844bc7444c6a489fcde0dc7011c6c4807edd. It was introduced to resolve some failing tests at the cost of making the intention of the spec much less clear. Thanks to the previous fixes we have added to this spec, we can revert that patch now.
-rw-r--r--spec/commands/exec_spec.rb2
-rw-r--r--spec/support/helpers.rb2
-rw-r--r--spec/support/path.rb4
3 files changed, 2 insertions, 6 deletions
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb
index 64a1b378ae..8ad5a3c125 100644
--- a/spec/commands/exec_spec.rb
+++ b/spec/commands/exec_spec.rb
@@ -856,7 +856,7 @@ __FILE__: #{path.to_s.inspect}
file = bundled_app("file_that_bundle_execs.rb")
create_file(file, <<-RB)
#!#{Gem.ruby}
- puts `#{system_bundle_bin_path} exec echo foo`
+ puts `bundle exec echo foo`
RB
file.chmod(0o777)
bundle! "exec #{file}", :system_bundler => true
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index 2445b566aa..02ec3c790b 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -110,7 +110,7 @@ module Spec
bundle_bin = options.delete("bundle_bin") || bindir.join("bundle")
if system_bundler = options.delete(:system_bundler)
- bundle_bin = system_bundle_bin_path
+ bundle_bin = system_gem_path.join("bin/bundler")
end
env = options.delete(:env) || {}
diff --git a/spec/support/path.rb b/spec/support/path.rb
index aa06a3f047..b722ec498b 100644
--- a/spec/support/path.rb
+++ b/spec/support/path.rb
@@ -100,10 +100,6 @@ module Spec
tmp("gems/system", *path)
end
- def system_bundle_bin_path
- system_gem_path("bin/bundle")
- end
-
def lib_path(*args)
tmp("libs", *args)
end