test/rubygems/test_gem_dependency_installer.rb: Avoid Dir.chdir + block

This caused a warning "conflicting chdir during another chdir block"
during "make test-all".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2018-06-14 06:36:40 +00:00
Родитель 891d00b492
Коммит 99cc20519b
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -445,9 +445,13 @@ class TestGemDependencyInstaller < Gem::TestCase
FileUtils.mv f1_gem, @tempdir
inst = nil
Dir.chdir @tempdir do
pwd = Dir.getwd
Dir.chdir @tempdir
begin
inst = Gem::DependencyInstaller.new
inst.install 'f'
ensure
Dir.chdir pwd
end
assert_equal %w[f-1], inst.installed_gems.map { |s| s.full_name }