summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_cleanup_command.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-25 21:05:45 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-05-12 17:24:43 +0900
commit3948be350312b908ea3ecf32ecf1adf420fe74ca (patch)
tree8f01de8e25e201e16a4f15b1124f7251a892d0a4 /test/rubygems/test_gem_commands_cleanup_command.rb
parent81d793a9216303f70143b13a88c924c22ce4af6d (diff)
[rubygems/rubygems] Use assert_path_exist and assert_path_not_exist instead of assert_path_exists and refute_path_exists
https://github.com/rubygems/rubygems/commit/a7c93558c3
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4491
Diffstat (limited to 'test/rubygems/test_gem_commands_cleanup_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_cleanup_command.rb48
1 files changed, 24 insertions, 24 deletions
diff --git a/test/rubygems/test_gem_commands_cleanup_command.rb b/test/rubygems/test_gem_commands_cleanup_command.rb
index d937a5e549..6e21e8c68b 100644
--- a/test/rubygems/test_gem_commands_cleanup_command.rb
+++ b/test/rubygems/test_gem_commands_cleanup_command.rb
@@ -62,7 +62,7 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
@cmd.execute
- refute_path_exists @a_1.gem_dir
+ assert_path_not_exist @a_1.gem_dir
end
def test_execute_all_dependencies
@@ -81,8 +81,8 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
@cmd.execute
- refute_path_exists @a_1.gem_dir
- refute_path_exists @b_1.gem_dir
+ assert_path_not_exist @a_1.gem_dir
+ assert_path_not_exist @b_1.gem_dir
end
def test_execute_dev_dependencies
@@ -101,7 +101,7 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
@cmd.execute
- assert_path_exists @a_1.gem_dir
+ assert_path_exist @a_1.gem_dir
end
def test_execute_without_dev_dependencies
@@ -120,7 +120,7 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
@cmd.execute
- refute_path_exists @a_1.gem_dir
+ assert_path_not_exist @a_1.gem_dir
end
def test_execute_all
@@ -143,8 +143,8 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
assert_equal @gemhome, Gem.dir, 'GEM_HOME'
assert_equal [@gemhome, gemhome2], Gem.path.sort, 'GEM_PATH'
- refute_path_exists @a_1.gem_dir
- refute_path_exists @b_1.gem_dir
+ assert_path_not_exist @a_1.gem_dir
+ assert_path_not_exist @b_1.gem_dir
end
def test_execute_all_user
@@ -153,15 +153,15 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
Gem::Specification.dirs = [Gem.dir, Gem.user_dir]
- assert_path_exists @a_1.gem_dir
- assert_path_exists @a_1_1.gem_dir
+ assert_path_exist @a_1.gem_dir
+ assert_path_exist @a_1_1.gem_dir
@cmd.options[:args] = %w[a]
@cmd.execute
- refute_path_exists @a_1.gem_dir
- refute_path_exists @a_1_1.gem_dir
+ assert_path_not_exist @a_1.gem_dir
+ assert_path_not_exist @a_1_1.gem_dir
end
def test_execute_all_user_no_sudo
@@ -172,15 +172,15 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
Gem::Specification.dirs = [Gem.dir, Gem.user_dir]
- assert_path_exists @a_1.gem_dir
- assert_path_exists @a_1_1.gem_dir
+ assert_path_exist @a_1.gem_dir
+ assert_path_exist @a_1_1.gem_dir
@cmd.options[:args] = %w[a]
@cmd.execute
- assert_path_exists @a_1.gem_dir
- assert_path_exists @a_1_1.gem_dir
+ assert_path_exist @a_1.gem_dir
+ assert_path_exist @a_1_1.gem_dir
ensure
FileUtils.chmod 0755, @gemhome
end unless win_platform? || Process.uid.zero?
@@ -191,7 +191,7 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
@cmd.execute
- assert_path_exists @a_1.gem_dir
+ assert_path_exist @a_1.gem_dir
end
def test_execute_keeps_older_versions_with_deps
@@ -210,7 +210,7 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
@cmd.execute
- assert_path_exists @b_1.gem_dir
+ assert_path_exist @b_1.gem_dir
end
def test_execute_ignore_default_gem_verbose
@@ -257,9 +257,9 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
@cmd.execute
- assert_path_exists c_1.gem_dir
- refute_path_exists d_1.gem_dir
- refute_path_exists e_1.gem_dir
+ assert_path_exist c_1.gem_dir
+ assert_path_not_exist d_1.gem_dir
+ assert_path_not_exist e_1.gem_dir
end
def test_execute_user_install
@@ -282,10 +282,10 @@ class TestGemCommandsCleanupCommand < Gem::TestCase
@cmd.execute
- refute_path_exists c_1.gem_dir
- assert_path_exists c_2.gem_dir
+ assert_path_not_exist c_1.gem_dir
+ assert_path_exist c_2.gem_dir
- assert_path_exists d_1.gem_dir
- assert_path_exists d_2.gem_dir
+ assert_path_exist d_1.gem_dir
+ assert_path_exist d_2.gem_dir
end
end