зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Update tests to match new implementation of falling back to user-writable directories.
https://github.com/rubygems/rubygems/commit/a06e657ac6
This commit is contained in:
Родитель
262f345344
Коммит
225c05e3ec
|
@ -159,9 +159,9 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase
|
||||||
FileUtils.chmod 0o755, @gemhome
|
FileUtils.chmod 0o755, @gemhome
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_auto_user_install_unless_gem_home_writable
|
def test_auto_install_dir_unless_gem_home_writable
|
||||||
if Process.uid.zero?
|
if Process.uid.zero?
|
||||||
pend("test_auto_user_install_unless_gem_home_writable test skipped in root privilege")
|
pend("test_auto_install_dir_unless_gem_home_writable test skipped in root privilege")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -174,14 +174,14 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase
|
||||||
|
|
||||||
@cmd.handle_options %w[]
|
@cmd.handle_options %w[]
|
||||||
|
|
||||||
refute @cmd.options[:user_install]
|
assert_not_equal Gem.paths.home, Gem.user_dir
|
||||||
|
|
||||||
FileUtils.chmod 0o755, @userhome
|
FileUtils.chmod 0o755, @userhome
|
||||||
FileUtils.chmod 0o000, @gemhome
|
FileUtils.chmod 0o000, @gemhome
|
||||||
|
|
||||||
Gem.use_paths @gemhome, @userhome
|
Gem.use_paths @gemhome, @userhome
|
||||||
|
|
||||||
@cmd.install_update_options.include?(:user_install)
|
assert_equal Gem.paths.home, Gem.user_dir
|
||||||
ensure
|
ensure
|
||||||
FileUtils.chmod 0o755, @gemhome
|
FileUtils.chmod 0o755, @gemhome
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче