summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-08-06 13:16:44 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-08-16 08:43:45 +0200
commitef55470cc676172b20d1d365cb0ce8c4bc1e3d9d (patch)
tree67033c201a91f971cc76d26b3cf09919d2f2b41d
parentf2df73bdb443ebbfc502ac2bc47ddcf1f8fe8dee (diff)
downloadbundler-ef55470cc676172b20d1d365cb0ce8c4bc1e3d9d.tar.gz
Remove unnecessary `let`
Use shared helper instead.
-rw-r--r--spec/runtime/setup_spec.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index 748bbcbf23..abc8b454a5 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -804,7 +804,6 @@ end
context "with bundler is located in symlinked GEM_HOME" do
let(:gem_home) { Dir.mktmpdir }
let(:symlinked_gem_home) { Tempfile.new("gem_home").path }
- let(:bundler_dir) { ruby_core? ? File.expand_path("../../../..", __FILE__) : File.expand_path("../../..", __FILE__) }
let(:full_name) { "bundler-#{Bundler::VERSION}" }
before do
@@ -814,9 +813,9 @@ end
Dir.mkdir(gems_dir)
Dir.mkdir(specifications_dir)
- FileUtils.ln_s(bundler_dir, File.join(gems_dir, full_name))
+ FileUtils.ln_s(root, File.join(gems_dir, full_name))
- gemspec_file = ruby_core? ? "#{bundler_dir}/lib/bundler/bundler.gemspec" : "#{bundler_dir}/bundler.gemspec"
+ gemspec_file = ruby_core? ? "#{root}/lib/bundler/bundler.gemspec" : "#{root}/bundler.gemspec"
gemspec = File.binread(gemspec_file).
sub("Bundler::VERSION", %("#{Bundler::VERSION}"))
gemspec = gemspec.lines.reject {|line| line =~ %r{lib/bundler/version} }.join