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

[bundler/bundler] Only chdir when necessary

https://github.com/bundler/bundler/commit/07161ebc1a
This commit is contained in:
David Rodríguez 2019-08-15 18:48:09 +02:00 committed by Hiroshi SHIBATA
parent 580e093fdd
commit 20c5154f0b
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -225,15 +225,14 @@ RSpec.describe "The library itself" do
end
it "can still be built" do
Dir.chdir(root) do
if ruby_core?
spec = Gem::Specification.load(gemspec.to_s)
spec.bindir = "libexec"
File.open(root.join("bundler.gemspec").to_s, "w") {|f| f.write spec.to_ruby }
gem_command! :build, root.join("bundler.gemspec")
Dir.chdir(root) { gem_command! :build, root.join("bundler.gemspec") }
FileUtils.rm(root.join("bundler.gemspec"))
else
gem_command! :build, gemspec
Dir.chdir(root) { gem_command! :build, gemspec }
end
bundler_path = root.join("bundler-#{Bundler::VERSION}.gem")
@ -244,7 +243,6 @@ RSpec.describe "The library itself" do
bundler_path.rmtree
end
end
end
it "ships the correct set of files", :ruby_repo do
Dir.chdir(root) do