1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[bundler/bundler] Remove unnecessary let

Use shared helper instead.

https://github.com/bundler/bundler/commit/ef55470cc6
This commit is contained in:
David Rodríguez 2019-08-06 13:16:44 +02:00 committed by Hiroshi SHIBATA
parent 745b286161
commit a2ca3a12ba
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -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