From a2ca3a12ba35d8991099cb23be4bdeb15e5cd459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 6 Aug 2019 13:16:44 +0200 Subject: [bundler/bundler] Remove unnecessary `let` Use shared helper instead. https://github.com/bundler/bundler/commit/ef55470cc6 --- spec/bundler/runtime/setup_spec.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'spec/bundler/runtime') diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb index 748bbcbf23..abc8b454a5 100644 --- a/spec/bundler/runtime/setup_spec.rb +++ b/spec/bundler/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 -- cgit v1.2.3