aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_install_update_options.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_install_update_options.rb')
-rw-r--r--test/rubygems/test_gem_install_update_options.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/rubygems/test_gem_install_update_options.rb b/test/rubygems/test_gem_install_update_options.rb
index fe10fd4949..2f0b911604 100644
--- a/test/rubygems/test_gem_install_update_options.rb
+++ b/test/rubygems/test_gem_install_update_options.rb
@@ -46,9 +46,8 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase
@installer = Gem::Installer.new @gem, @cmd.options
@installer.install
- assert File.exist?(File.join(Gem.user_dir, 'gems'))
- assert File.exist?(File.join(Gem.user_dir, 'gems',
- @spec.full_name))
+ assert_path_exists File.join(Gem.user_dir, 'gems')
+ assert_path_exists File.join(Gem.user_dir, 'gems', @spec.full_name)
end
def test_user_install_disabled_read_only
@@ -59,11 +58,13 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase
refute @cmd.options[:user_install]
- File.chmod 0755, @userhome
+ FileUtils.chmod 0755, @userhome
FileUtils.chmod 0000, @gemhome
+ Gem.use_paths @gemhome, @userhome
+
assert_raises(Gem::FilePermissionError) do
- @installer = Gem::Installer.new @gem, @cmd.options
+ Gem::Installer.new(@gem, @cmd.options).install
end
end
ensure