From 3948be350312b908ea3ecf32ecf1adf420fe74ca Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 25 May 2020 21:05:45 +0900 Subject: [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 --- test/rubygems/test_gem.rb | 14 +- test/rubygems/test_gem_commands_cert_command.rb | 44 +++---- test/rubygems/test_gem_commands_check_command.rb | 8 +- test/rubygems/test_gem_commands_cleanup_command.rb | 48 +++---- test/rubygems/test_gem_commands_fetch_command.rb | 18 +-- test/rubygems/test_gem_commands_install_command.rb | 8 +- .../rubygems/test_gem_commands_pristine_command.rb | 26 ++-- test/rubygems/test_gem_commands_setup_command.rb | 42 +++--- test/rubygems/test_gem_commands_unpack_command.rb | 2 +- test/rubygems/test_gem_commands_update_command.rb | 8 +- test/rubygems/test_gem_dependency_installer.rb | 2 +- test/rubygems/test_gem_doctor.rb | 52 ++++---- test/rubygems/test_gem_ext_builder.rb | 34 ++--- test/rubygems/test_gem_ext_ext_conf_builder.rb | 4 +- test/rubygems/test_gem_install_update_options.rb | 4 +- test/rubygems/test_gem_installer.rb | 144 ++++++++++----------- test/rubygems/test_gem_package.rb | 28 ++-- test/rubygems/test_gem_package_old.rb | 2 +- test/rubygems/test_gem_package_task.rb | 2 +- test/rubygems/test_gem_rdoc.rb | 4 +- test/rubygems/test_gem_remote_fetcher.rb | 2 +- test/rubygems/test_gem_request_set.rb | 22 ++-- test/rubygems/test_gem_request_set_lockfile.rb | 4 +- test/rubygems/test_gem_resolver_git_set.rb | 2 +- .../test_gem_resolver_git_specification.rb | 2 +- .../test_gem_resolver_index_specification.rb | 2 +- .../test_gem_resolver_local_specification.rb | 2 +- test/rubygems/test_gem_resolver_specification.rb | 2 +- test/rubygems/test_gem_security.rb | 6 +- test/rubygems/test_gem_security_signer.rb | 2 +- test/rubygems/test_gem_security_trust_dir.rb | 6 +- test/rubygems/test_gem_source_git.rb | 16 +-- test/rubygems/test_gem_specification.rb | 18 +-- test/rubygems/test_gem_uninstaller.rb | 18 +-- test/rubygems/test_require.rb | 4 +- 35 files changed, 301 insertions(+), 301 deletions(-) (limited to 'test/rubygems') diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index b3c8a7abb5..2b39301a67 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb @@ -106,7 +106,7 @@ class TestGem < Gem::TestCase assert_equal %w[a-1], installed.map {|spec| spec.full_name } - assert_path_exists File.join(gemhome2, 'gems', 'a-1') + assert_path_exist File.join(gemhome2, 'gems', 'a-1') end def test_self_install_in_rescue @@ -692,12 +692,12 @@ class TestGem < Gem::TestCase Gem.ensure_gem_subdirectories @gemhome - assert_path_exists File.join @gemhome, 'build_info' - assert_path_exists File.join @gemhome, 'cache' - assert_path_exists File.join @gemhome, 'doc' - assert_path_exists File.join @gemhome, 'extensions' - assert_path_exists File.join @gemhome, 'gems' - assert_path_exists File.join @gemhome, 'specifications' + assert_path_exist File.join @gemhome, 'build_info' + assert_path_exist File.join @gemhome, 'cache' + assert_path_exist File.join @gemhome, 'doc' + assert_path_exist File.join @gemhome, 'extensions' + assert_path_exist File.join @gemhome, 'gems' + assert_path_exist File.join @gemhome, 'specifications' end def test_self_ensure_gem_directories_permissions diff --git a/test/rubygems/test_gem_commands_cert_command.rb b/test/rubygems/test_gem_commands_cert_command.rb index 19867bf37a..bd19ac35bd 100644 --- a/test/rubygems/test_gem_commands_cert_command.rb +++ b/test/rubygems/test_gem_commands_cert_command.rb @@ -83,7 +83,7 @@ class TestGemCommandsCertCommand < Gem::TestCase cert_path = @trust_dir.cert_path PUBLIC_CERT - assert_path_exists cert_path + assert_path_exist cert_path assert_equal "Added '/CN=nobody/DC=example'\n", @ui.output assert_empty @ui.error @@ -138,8 +138,8 @@ Added '/CN=alternate/DC=example' assert_empty output assert_empty @build_ui.error - assert_path_exists File.join(@tempdir, 'gem-private_key.pem') - assert_path_exists File.join(@tempdir, 'gem-public_cert.pem') + assert_path_exist File.join(@tempdir, 'gem-private_key.pem') + assert_path_exist File.join(@tempdir, 'gem-public_cert.pem') end def test_execute_build_bad_email_address @@ -159,8 +159,8 @@ Added '/CN=alternate/DC=example' assert_equal "Invalid email address #{email}", e.message - refute_path_exists File.join(@tempdir, 'gem-private_key.pem') - refute_path_exists File.join(@tempdir, 'gem-public_cert.pem') + assert_path_not_exist File.join(@tempdir, 'gem-private_key.pem') + assert_path_not_exist File.join(@tempdir, 'gem-public_cert.pem') end end @@ -195,8 +195,8 @@ Added '/CN=alternate/DC=example' assert_empty output assert_empty @build_ui.error - assert_path_exists File.join(@tempdir, 'gem-private_key.pem') - assert_path_exists File.join(@tempdir, 'gem-public_cert.pem') + assert_path_exist File.join(@tempdir, 'gem-private_key.pem') + assert_path_exist File.join(@tempdir, 'gem-public_cert.pem') pem = File.read("#{@tempdir}/gem-public_cert.pem") cert = OpenSSL::X509::Certificate.new(pem) @@ -232,8 +232,8 @@ Added '/CN=alternate/DC=example' end - refute_path_exists File.join(@tempdir, 'gem-private_key.pem') - refute_path_exists File.join(@tempdir, 'gem-public_cert.pem') + assert_path_not_exist File.join(@tempdir, 'gem-private_key.pem') + assert_path_not_exist File.join(@tempdir, 'gem-public_cert.pem') end def test_execute_build_key @@ -254,8 +254,8 @@ Added '/CN=alternate/DC=example' assert_empty output assert_empty @ui.error - assert_path_exists File.join(@tempdir, 'gem-public_cert.pem') - refute_path_exists File.join(@tempdir, 'gem-private_key.pem') + assert_path_exist File.join(@tempdir, 'gem-public_cert.pem') + assert_path_not_exist File.join(@tempdir, 'gem-private_key.pem') end def test_execute_build_encrypted_key @@ -276,7 +276,7 @@ Added '/CN=alternate/DC=example' assert_empty output assert_empty @ui.error - assert_path_exists File.join(@tempdir, 'gem-public_cert.pem') + assert_path_exist File.join(@tempdir, 'gem-public_cert.pem') end def test_execute_certificate @@ -346,7 +346,7 @@ Added '/CN=alternate/DC=example' cert_path = @trust_dir.cert_path PUBLIC_CERT - assert_path_exists cert_path + assert_path_exist cert_path @cmd.handle_options %W[--remove nobody] @@ -357,7 +357,7 @@ Added '/CN=alternate/DC=example' assert_equal "Removed '/CN=nobody/DC=example'\n", @ui.output assert_equal '', @ui.error - refute_path_exists cert_path + assert_path_not_exist cert_path end def test_execute_remove_multiple @@ -367,8 +367,8 @@ Added '/CN=alternate/DC=example' public_path = @trust_dir.cert_path PUBLIC_CERT alternate_path = @trust_dir.cert_path ALTERNATE_CERT - assert_path_exists public_path - assert_path_exists alternate_path + assert_path_exist public_path + assert_path_exist alternate_path @cmd.handle_options %W[--remove example] @@ -384,8 +384,8 @@ Removed '/CN=nobody/DC=example' assert_equal expected, @ui.output assert_equal '', @ui.error - refute_path_exists public_path - refute_path_exists alternate_path + assert_path_not_exist public_path + assert_path_not_exist alternate_path end def test_execute_remove_twice @@ -395,8 +395,8 @@ Removed '/CN=nobody/DC=example' public_path = @trust_dir.cert_path PUBLIC_CERT alternate_path = @trust_dir.cert_path ALTERNATE_CERT - assert_path_exists public_path - assert_path_exists alternate_path + assert_path_exist public_path + assert_path_exist alternate_path @cmd.handle_options %W[--remove nobody --remove alternate] @@ -412,8 +412,8 @@ Removed '/CN=alternate/DC=example' assert_equal expected, @ui.output assert_equal '', @ui.error - refute_path_exists public_path - refute_path_exists alternate_path + assert_path_not_exist public_path + assert_path_not_exist alternate_path end def test_execute_sign diff --git a/test/rubygems/test_gem_commands_check_command.rb b/test/rubygems/test_gem_commands_check_command.rb index da5b411c83..07eea188e3 100644 --- a/test/rubygems/test_gem_commands_check_command.rb +++ b/test/rubygems/test_gem_commands_check_command.rb @@ -50,8 +50,8 @@ class TestGemCommandsCheckCommand < Gem::TestCase FileUtils.rm b.spec_file - assert_path_exists b.gem_dir - refute_path_exists b.spec_file + assert_path_exist b.gem_dir + assert_path_not_exist b.spec_file Gem.use_paths @gemhome @@ -61,7 +61,7 @@ class TestGemCommandsCheckCommand < Gem::TestCase end end - refute_path_exists b.gem_dir - refute_path_exists b.spec_file + assert_path_not_exist b.gem_dir + assert_path_not_exist b.spec_file end end 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 diff --git a/test/rubygems/test_gem_commands_fetch_command.rb b/test/rubygems/test_gem_commands_fetch_command.rb index dfe0d91726..9a81e8898e 100644 --- a/test/rubygems/test_gem_commands_fetch_command.rb +++ b/test/rubygems/test_gem_commands_fetch_command.rb @@ -16,7 +16,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase fetcher.gem 'a', 2 end - refute_path_exists File.join(@tempdir, 'cache'), 'sanity check' + assert_path_not_exist File.join(@tempdir, 'cache'), 'sanity check' @cmd.options[:args] = %w[a] @@ -28,9 +28,9 @@ class TestGemCommandsFetchCommand < Gem::TestCase a2 = specs['a-2'] - assert_path_exists(File.join(@tempdir, a2.file_name), + assert_path_exist(File.join(@tempdir, a2.file_name), "#{a2.full_name} not fetched") - refute_path_exists File.join(@tempdir, 'cache'), + assert_path_not_exist File.join(@tempdir, 'cache'), 'gem repository directories must not be created' end @@ -40,7 +40,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase fetcher.gem 'a', 2 end - refute_path_exists File.join(@tempdir, 'cache'), 'sanity check' + assert_path_not_exist File.join(@tempdir, 'cache'), 'sanity check' @cmd.options[:args] = %w[a] @cmd.options[:version] = req('>= 0.1') @@ -52,9 +52,9 @@ class TestGemCommandsFetchCommand < Gem::TestCase end a2 = specs['a-2'] - assert_path_exists(File.join(@tempdir, a2.file_name), + assert_path_exist(File.join(@tempdir, a2.file_name), "#{a2.full_name} not fetched") - refute_path_exists File.join(@tempdir, 'cache'), + assert_path_not_exist File.join(@tempdir, 'cache'), 'gem repository directories must not be created' end @@ -75,7 +75,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase a2 = specs['a-2'] - assert_path_exists(File.join(@tempdir, a2.file_name), + assert_path_exist(File.join(@tempdir, a2.file_name), "#{a2.full_name} not fetched") end @@ -97,7 +97,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase a2_pre = specs['a-2.a'] - assert_path_exists(File.join(@tempdir, a2_pre.file_name), + assert_path_exist(File.join(@tempdir, a2_pre.file_name), "#{a2_pre.full_name} not fetched") end @@ -118,7 +118,7 @@ class TestGemCommandsFetchCommand < Gem::TestCase a1 = specs['a-1'] - assert_path_exists(File.join(@tempdir, a1.file_name), + assert_path_exist(File.join(@tempdir, a1.file_name), "#{a1.full_name} not fetched") end end diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb index c8015f9985..34b4aae1e5 100644 --- a/test/rubygems/test_gem_commands_install_command.rb +++ b/test/rubygems/test_gem_commands_install_command.rb @@ -667,8 +667,8 @@ ERROR: Possible alternatives: non_existent_with_hint wait_for_child_process_to_exit - assert_path_exists File.join(a2.doc_dir, 'ri') - assert_path_exists File.join(a2.doc_dir, 'rdoc') + assert_path_exist File.join(a2.doc_dir, 'ri') + assert_path_exist File.join(a2.doc_dir, 'rdoc') end def test_execute_rdoc_with_path @@ -704,7 +704,7 @@ ERROR: Possible alternatives: non_existent_with_hint wait_for_child_process_to_exit - assert_path_exists 'whatever/doc/a-2', 'documentation not installed' + assert_path_exist 'whatever/doc/a-2', 'documentation not installed' end def test_execute_saves_build_args @@ -739,7 +739,7 @@ ERROR: Possible alternatives: non_existent_with_hint end path = a2.build_info_file - assert_path_exists path + assert_path_exist path assert_equal args, a2.build_args end diff --git a/test/rubygems/test_gem_commands_pristine_command.rb b/test/rubygems/test_gem_commands_pristine_command.rb index 59f34af249..5f869c0266 100644 --- a/test/rubygems/test_gem_commands_pristine_command.rb +++ b/test/rubygems/test_gem_commands_pristine_command.rb @@ -155,7 +155,7 @@ class TestGemCommandsPristineCommand < Gem::TestCase @cmd.execute end - assert_path_exists gem_exec + assert_path_exist gem_exec ruby_exec = sprintf Gem.default_exec_format, 'ruby' @@ -356,10 +356,10 @@ class TestGemCommandsPristineCommand < Gem::TestCase assert_equal "Restored #{b.full_name}", out.shift assert_empty out, out.inspect - assert_path_exists File.join(@gemhome, "gems", 'a-2') - refute_path_exists File.join(gemhome2, "gems", 'a-2') - assert_path_exists File.join(gemhome2, "gems", 'b-2') - refute_path_exists File.join(@gemhome, "gems", 'b-2') + assert_path_exist File.join(@gemhome, "gems", 'a-2') + assert_path_not_exist File.join(gemhome2, "gems", 'a-2') + assert_path_exist File.join(gemhome2, "gems", 'b-2') + assert_path_not_exist File.join(@gemhome, "gems", 'b-2') end def test_execute_missing_cache_gem @@ -434,15 +434,15 @@ class TestGemCommandsPristineCommand < Gem::TestCase assert_empty out, out.inspect assert_empty @ui.error - assert_path_exists File.join(@gemhome, "cache", 'a-1.gem') - refute_path_exists File.join(gemhome2, "cache", 'a-2.gem') - assert_path_exists File.join(@gemhome, "gems", 'a-1') - refute_path_exists File.join(gemhome2, "gems", 'a-1') + assert_path_exist File.join(@gemhome, "cache", 'a-1.gem') + assert_path_not_exist File.join(gemhome2, "cache", 'a-2.gem') + assert_path_exist File.join(@gemhome, "gems", 'a-1') + assert_path_not_exist File.join(gemhome2, "gems", 'a-1') - assert_path_exists File.join(gemhome2, "cache", 'b-1.gem') - refute_path_exists File.join(@gemhome, "cache", 'b-2.gem') - assert_path_exists File.join(gemhome2, "gems", 'b-1') - refute_path_exists File.join(@gemhome, "gems", 'b-1') + assert_path_exist File.join(gemhome2, "cache", 'b-1.gem') + assert_path_not_exist File.join(@gemhome, "cache", 'b-2.gem') + assert_path_exist File.join(gemhome2, "gems", 'b-1') + assert_path_not_exist File.join(@gemhome, "gems", 'b-1') end def test_execute_no_gem diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb index 7a40136070..e324d25562 100644 --- a/test/rubygems/test_gem_commands_setup_command.rb +++ b/test/rubygems/test_gem_commands_setup_command.rb @@ -169,14 +169,14 @@ class TestGemCommandsSetupCommand < Gem::TestCase Dir.mktmpdir 'lib' do |dir| @cmd.install_lib dir - assert_path_exists File.join(dir, 'rubygems.rb') - assert_path_exists File.join(dir, 'rubygems/ssl_certs/rubygems.org/foo.pem') + assert_path_exist File.join(dir, 'rubygems.rb') + assert_path_exist File.join(dir, 'rubygems/ssl_certs/rubygems.org/foo.pem') - assert_path_exists File.join(dir, 'bundler.rb') - assert_path_exists File.join(dir, 'bundler/b.rb') + assert_path_exist File.join(dir, 'bundler.rb') + assert_path_exist File.join(dir, 'bundler/b.rb') - assert_path_exists File.join(dir, 'bundler/templates/.circleci/config.yml') unless RUBY_ENGINE == "truffleruby" # https://github.com/oracle/truffleruby/issues/2116 - assert_path_exists File.join(dir, 'bundler/templates/.travis.yml') + assert_path_exist File.join(dir, 'bundler/templates/.circleci/config.yml') unless RUBY_ENGINE == "truffleruby" # https://github.com/oracle/truffleruby/issues/2116 + assert_path_exist File.join(dir, 'bundler/templates/.travis.yml') end end @@ -192,27 +192,27 @@ class TestGemCommandsSetupCommand < Gem::TestCase spec.executables.each do |e| if Gem.win_platform? - assert_path_exists File.join(bin_dir, "#{e}.bat") + assert_path_exist File.join(bin_dir, "#{e}.bat") end - assert_path_exists File.join bin_dir, e + assert_path_exist File.join bin_dir, e end default_dir = Gem.default_specifications_dir # expect to remove other versions of bundler gemspecs on default specification directory. - refute_path_exists File.join(default_dir, "bundler-1.15.4.gemspec") - assert_path_exists File.join(default_dir, "bundler-#{BUNDLER_VERS}.gemspec") + assert_path_not_exist File.join(default_dir, "bundler-1.15.4.gemspec") + assert_path_exist File.join(default_dir, "bundler-#{BUNDLER_VERS}.gemspec") # expect to not remove bundler-* gemspecs. - assert_path_exists File.join(Gem.dir, "specifications", "bundler-audit-1.0.0.gemspec") + assert_path_exist File.join(Gem.dir, "specifications", "bundler-audit-1.0.0.gemspec") # expect to remove normal gem that was same version. because it's promoted default gems. - refute_path_exists File.join(Gem.dir, "specifications", "bundler-#{BUNDLER_VERS}.gemspec") + assert_path_not_exist File.join(Gem.dir, "specifications", "bundler-#{BUNDLER_VERS}.gemspec") - assert_path_exists "#{Gem.dir}/gems/bundler-#{BUNDLER_VERS}" - assert_path_exists "#{Gem.dir}/gems/bundler-1.15.4" - assert_path_exists "#{Gem.dir}/gems/bundler-audit-1.0.0" + assert_path_exist "#{Gem.dir}/gems/bundler-#{BUNDLER_VERS}" + assert_path_exist "#{Gem.dir}/gems/bundler-1.15.4" + assert_path_exist "#{Gem.dir}/gems/bundler-audit-1.0.0" end def test_install_default_bundler_gem_with_force_flag @@ -238,10 +238,10 @@ class TestGemCommandsSetupCommand < Gem::TestCase spec.executables.each do |e| if Gem.win_platform? - assert_path_exists File.join(bin_dir, "#{e}.bat") + assert_path_exist File.join(bin_dir, "#{e}.bat") end - assert_path_exists File.join bin_dir, e + assert_path_exist File.join bin_dir, e end end end @@ -272,9 +272,9 @@ class TestGemCommandsSetupCommand < Gem::TestCase @cmd.remove_old_lib_files lib - files_that_go.each {|file| refute_path_exists(file) unless file == old_bundler_ci && RUBY_ENGINE == "truffleruby" } # https://github.com/oracle/truffleruby/issues/2116 + files_that_go.each {|file| assert_path_not_exist(file) unless file == old_bundler_ci && RUBY_ENGINE == "truffleruby" } # https://github.com/oracle/truffleruby/issues/2116 - files_that_stay.each {|file| assert_path_exists file } + files_that_stay.each {|file| assert_path_exist file } end def test_remove_old_man_files @@ -295,9 +295,9 @@ class TestGemCommandsSetupCommand < Gem::TestCase @cmd.remove_old_man_files man - files_that_go.each {|file| refute_path_exists file } + files_that_go.each {|file| assert_path_not_exist file } - files_that_stay.each {|file| assert_path_exists file } + files_that_stay.each {|file| assert_path_exist file } end def test_show_release_notes diff --git a/test/rubygems/test_gem_commands_unpack_command.rb b/test/rubygems/test_gem_commands_unpack_command.rb index e1fea0f0ff..06bdc510aa 100644 --- a/test/rubygems/test_gem_commands_unpack_command.rb +++ b/test/rubygems/test_gem_commands_unpack_command.rb @@ -210,7 +210,7 @@ class TestGemCommandsUnpackCommand < Gem::TestCase end end - assert_path_exists File.join(@tempdir, foo_spec.full_name) + assert_path_exist File.join(@tempdir, foo_spec.full_name) end def test_handle_options_metadata diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb index 9b590f0022..927527e6b1 100644 --- a/test/rubygems/test_gem_commands_update_command.rb +++ b/test/rubygems/test_gem_commands_update_command.rb @@ -211,7 +211,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase @cmd.execute - refute_path_exists Gem.plugindir, "Plugins folder not removed when updating rubygems to pre-3.2" + assert_path_not_exist Gem.plugindir, "Plugins folder not removed when updating rubygems to pre-3.2" end def test_execute_system_specific_newer_than_or_equal_to_3_2_leaves_plugins_dir_alone @@ -239,8 +239,8 @@ class TestGemCommandsUpdateCommand < Gem::TestCase @cmd.execute - assert_path_exists Gem.plugindir, "Plugin folder removed when updating rubygems to post-3.2" - assert_path_exists plugin_file, "Plugin removed when updating rubygems to post-3.2" + assert_path_exist Gem.plugindir, "Plugin folder removed when updating rubygems to post-3.2" + assert_path_exist plugin_file, "Plugin removed when updating rubygems to post-3.2" end def test_execute_system_specifically_to_latest_version @@ -384,7 +384,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase a2 = @specs['a-2'] - assert_path_exists File.join(a2.doc_dir, 'rdoc') + assert_path_exist File.join(a2.doc_dir, 'rdoc') end def test_execute_named diff --git a/test/rubygems/test_gem_dependency_installer.rb b/test/rubygems/test_gem_dependency_installer.rb index c62a3f355a..fd58f8b872 100644 --- a/test/rubygems/test_gem_dependency_installer.rb +++ b/test/rubygems/test_gem_dependency_installer.rb @@ -392,7 +392,7 @@ class TestGemDependencyInstaller < Gem::TestCase assert_equal %w[f-1], inst.installed_gems.map {|s| s.full_name } - assert_path_exists e1.extension_dir + assert_path_exist e1.extension_dir end def test_install_dependency_old diff --git a/test/rubygems/test_gem_doctor.rb b/test/rubygems/test_gem_doctor.rb index f99de3d020..4514d17f9f 100644 --- a/test/rubygems/test_gem_doctor.rb +++ b/test/rubygems/test_gem_doctor.rb @@ -27,14 +27,14 @@ class TestGemDoctor < Gem::TestCase io.write 'this will raise an exception when evaluated.' end - assert_path_exists File.join(a.gem_dir, 'Rakefile') - assert_path_exists File.join(a.gem_dir, 'lib', 'a.rb') + assert_path_exist File.join(a.gem_dir, 'Rakefile') + assert_path_exist File.join(a.gem_dir, 'lib', 'a.rb') - assert_path_exists b.gem_dir - refute_path_exists b.spec_file + assert_path_exist b.gem_dir + assert_path_not_exist b.spec_file - assert_path_exists c.gem_dir - assert_path_exists c.spec_file + assert_path_exist c.gem_dir + assert_path_exist c.spec_file doctor = Gem::Doctor.new @gemhome @@ -44,14 +44,14 @@ class TestGemDoctor < Gem::TestCase end end - assert_path_exists File.join(a.gem_dir, 'Rakefile') - assert_path_exists File.join(a.gem_dir, 'lib', 'a.rb') + assert_path_exist File.join(a.gem_dir, 'Rakefile') + assert_path_exist File.join(a.gem_dir, 'lib', 'a.rb') - refute_path_exists b.gem_dir - refute_path_exists b.spec_file + assert_path_not_exist b.gem_dir + assert_path_not_exist b.spec_file - refute_path_exists c.gem_dir - refute_path_exists c.spec_file + assert_path_not_exist c.gem_dir + assert_path_not_exist c.spec_file expected = <<-OUTPUT Checking #{@gemhome} @@ -80,14 +80,14 @@ Removed directory gems/c-2 io.write 'this will raise an exception when evaluated.' end - assert_path_exists File.join(a.gem_dir, 'Rakefile') - assert_path_exists File.join(a.gem_dir, 'lib', 'a.rb') + assert_path_exist File.join(a.gem_dir, 'Rakefile') + assert_path_exist File.join(a.gem_dir, 'lib', 'a.rb') - assert_path_exists b.gem_dir - refute_path_exists b.spec_file + assert_path_exist b.gem_dir + assert_path_not_exist b.spec_file - assert_path_exists c.gem_dir - assert_path_exists c.spec_file + assert_path_exist c.gem_dir + assert_path_exist c.spec_file doctor = Gem::Doctor.new @gemhome, true @@ -97,14 +97,14 @@ Removed directory gems/c-2 end end - assert_path_exists File.join(a.gem_dir, 'Rakefile') - assert_path_exists File.join(a.gem_dir, 'lib', 'a.rb') + assert_path_exist File.join(a.gem_dir, 'Rakefile') + assert_path_exist File.join(a.gem_dir, 'lib', 'a.rb') - assert_path_exists b.gem_dir - refute_path_exists b.spec_file + assert_path_exist b.gem_dir + assert_path_not_exist b.spec_file - assert_path_exists c.gem_dir - assert_path_exists c.spec_file + assert_path_exist c.gem_dir + assert_path_exist c.spec_file expected = <<-OUTPUT Checking #{@gemhome} @@ -133,7 +133,7 @@ Extra directory gems/c-2 end end - assert_path_exists other_dir + assert_path_exist other_dir expected = <<-OUTPUT Checking #{@tempdir} @@ -169,7 +169,7 @@ This directory does not appear to be a RubyGems repository, skipping end end - # refute_path_exists bad_plugin + # assert_path_not_exist bad_plugin expected = <<-OUTPUT Checking #{@gemhome} diff --git a/test/rubygems/test_gem_ext_builder.rb b/test/rubygems/test_gem_ext_builder.rb index b687a08771..7e3be35d48 100644 --- a/test/rubygems/test_gem_ext_builder.rb +++ b/test/rubygems/test_gem_ext_builder.rb @@ -133,12 +133,12 @@ install: @builder.build_extensions end - assert_path_exists @spec.extension_dir - assert_path_exists @spec.gem_build_complete_path - assert_path_exists File.join @spec.extension_dir, 'gem_make.out' - assert_path_exists File.join @spec.extension_dir, 'a.rb' - assert_path_exists File.join @spec.gem_dir, 'lib', 'a.rb' - assert_path_exists File.join @spec.gem_dir, 'lib', 'a', 'b.rb' + assert_path_exist @spec.extension_dir + assert_path_exist @spec.gem_build_complete_path + assert_path_exist File.join @spec.extension_dir, 'gem_make.out' + assert_path_exist File.join @spec.extension_dir, 'a.rb' + assert_path_exist File.join @spec.gem_dir, 'lib', 'a.rb' + assert_path_exist File.join @spec.gem_dir, 'lib', 'a', 'b.rb' end def test_build_extensions_with_gemhome_with_space @@ -191,12 +191,12 @@ install: @builder.build_extensions end - assert_path_exists @spec.extension_dir - assert_path_exists @spec.gem_build_complete_path - assert_path_exists File.join @spec.extension_dir, 'gem_make.out' - assert_path_exists File.join @spec.extension_dir, 'a.rb' - refute_path_exists File.join @spec.gem_dir, 'lib', 'a.rb' - refute_path_exists File.join @spec.gem_dir, 'lib', 'a', 'b.rb' + assert_path_exist @spec.extension_dir + assert_path_exist @spec.gem_build_complete_path + assert_path_exist File.join @spec.extension_dir, 'gem_make.out' + assert_path_exist File.join @spec.extension_dir, 'a.rb' + assert_path_not_exist File.join @spec.gem_dir, 'lib', 'a.rb' + assert_path_not_exist File.join @spec.gem_dir, 'lib', 'a', 'b.rb' ensure class << Gem remove_method :install_extension_in_lib @@ -213,7 +213,7 @@ install: assert_equal '', @ui.output assert_equal '', @ui.error - refute_path_exists File.join @spec.extension_dir, 'gem_make.out' + assert_path_not_exist File.join @spec.extension_dir, 'gem_make.out' end def test_build_extensions_rebuild_failure @@ -228,7 +228,7 @@ install: end end - refute_path_exists @spec.gem_build_complete_path + assert_path_not_exist @spec.gem_build_complete_path end def test_build_extensions_extconf_bad @@ -254,7 +254,7 @@ install: assert_match %r{#{Regexp.escape Gem.ruby} .* extconf\.rb}, cmd_make_out assert_match %r{: No such file}, cmd_make_out - refute_path_exists @spec.gem_build_complete_path + assert_path_not_exist @spec.gem_build_complete_path assert_equal cwd, Dir.pwd end @@ -276,7 +276,7 @@ install: assert_equal "No builder for extension ''\n", File.read(gem_make_out) - refute_path_exists @spec.gem_build_complete_path + assert_path_not_exist @spec.gem_build_complete_path ensure FileUtils.rm_f gem_make_out end @@ -311,7 +311,7 @@ install: path = File.join @spec.gem_dir, "extconf_args" assert_equal args.inspect, File.read(path).strip - assert_path_exists @spec.extension_dir + assert_path_exist @spec.extension_dir end def test_initialize diff --git a/test/rubygems/test_gem_ext_ext_conf_builder.rb b/test/rubygems/test_gem_ext_ext_conf_builder.rb index 21fe27166b..be7d18a9e1 100644 --- a/test/rubygems/test_gem_ext_ext_conf_builder.rb +++ b/test/rubygems/test_gem_ext_ext_conf_builder.rb @@ -114,7 +114,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase assert_match(File.join(@dest_path, 'mkmf.log'), output[4]) assert_includes(output, "To see why this extension failed to compile, please check the mkmf.log which can be found here:\n") - assert_path_exists File.join @dest_path, 'mkmf.log' + assert_path_exist File.join @dest_path, 'mkmf.log' end def test_class_build_extconf_success_without_warning @@ -134,7 +134,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase refute_includes(output, "To see why this extension failed to compile, please check the mkmf.log which can be found here:\n") - assert_path_exists File.join @dest_path, 'mkmf.log' + assert_path_exist File.join @dest_path, 'mkmf.log' end def test_class_build_unconventional diff --git a/test/rubygems/test_gem_install_update_options.rb b/test/rubygems/test_gem_install_update_options.rb index b4528dba17..aea03ffdd8 100644 --- a/test/rubygems/test_gem_install_update_options.rb +++ b/test/rubygems/test_gem_install_update_options.rb @@ -124,8 +124,8 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase @installer = Gem::Installer.at @gem, @cmd.options @installer.install - assert_path_exists File.join(Gem.user_dir, 'gems') - assert_path_exists File.join(Gem.user_dir, 'gems', @spec.full_name) + assert_path_exist File.join(Gem.user_dir, 'gems') + assert_path_exist File.join(Gem.user_dir, 'gems', @spec.full_name) end def test_user_install_disabled_read_only diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index 0d1f2c4102..d90154f01d 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -76,7 +76,7 @@ end installer.generate_bin installed_exec = File.join util_inst_bindir, 'executable' - assert_path_exists installed_exec + assert_path_exist installed_exec wrapper = File.read installed_exec assert_match %r{generated by RubyGems}, wrapper @@ -134,7 +134,7 @@ gem 'other', version installer.generate_bin # should not raise installed_exec = File.join util_inst_bindir, 'foo-executable-bar' - assert_path_exists installed_exec + assert_path_exist installed_exec wrapper = File.read installed_exec assert_match %r{generated by RubyGems}, wrapper @@ -169,7 +169,7 @@ gem 'other', version installer.generate_bin installed_exec = File.join util_inst_bindir, 'executable' - assert_path_exists installed_exec + assert_path_exist installed_exec wrapper = File.read installed_exec assert_match %r{generated by RubyGems}, wrapper @@ -184,7 +184,7 @@ gem 'other', version installer.generate_bin installed_exec = File.join util_inst_bindir, 'executable' - assert_path_exists installed_exec + assert_path_exist installed_exec wrapper = File.read installed_exec assert_match %r{generated by RubyGems}, wrapper @@ -306,7 +306,7 @@ gem 'other', version installer.extract_files - assert_path_exists File.join @spec.gem_dir, 'bin/executable' + assert_path_exist File.join @spec.gem_dir, 'bin/executable' end def test_generate_bin_bindir @@ -329,7 +329,7 @@ gem 'other', version assert_directory_exists util_inst_bindir installed_exec = File.join(util_inst_bindir, 'executable') - assert_path_exists installed_exec + assert_path_exist installed_exec assert_equal mask, File.stat(installed_exec).mode unless win_platform? wrapper = File.read installed_exec @@ -372,7 +372,7 @@ gem 'other', version installer.generate_bin assert_directory_exists util_inst_bindir installed_exec = File.join util_inst_bindir, 'executable' - assert_path_exists installed_exec + assert_path_exist installed_exec assert_equal mask, File.stat(installed_exec).mode unless win_platform? wrapper = File.read installed_exec @@ -391,7 +391,7 @@ gem 'other', version installer.generate_bin assert_directory_exists util_inst_bindir installed_exec = File.join util_inst_bindir, 'foo-executable-bar' - assert_path_exists installed_exec + assert_path_exist installed_exec ensure Gem::Installer.exec_format = nil end @@ -407,7 +407,7 @@ gem 'other', version installer.generate_bin assert_directory_exists util_inst_bindir installed_exec = File.join util_inst_bindir, 'executable' - assert_path_exists installed_exec + assert_path_exist installed_exec ensure Gem::Installer.exec_format = nil end @@ -431,7 +431,7 @@ gem 'other', version installer.generate_bin installed_exec = File.join("#{@gemhome}2", "bin", 'executable') - assert_path_exists installed_exec + assert_path_exist installed_exec assert_equal mask, File.stat(installed_exec).mode unless win_platform? wrapper = File.read installed_exec @@ -446,7 +446,7 @@ gem 'other', version installer.wrappers = true installer.generate_bin - refute_path_exists util_inst_bindir, 'bin dir was created when not needed' + assert_path_not_exist util_inst_bindir, 'bin dir was created when not needed' end def test_generate_bin_script_no_perms @@ -488,7 +488,7 @@ gem 'other', version installer.generate_bin installed_exec = File.join @gemhome, 'bin', 'executable' - assert_path_exists installed_exec + assert_path_exist installed_exec assert_equal mask, File.stat(installed_exec).mode unless win_platform? wrapper = File.read installed_exec @@ -515,7 +515,7 @@ gem 'other', version installer.generate_bin assert_directory_exists util_inst_bindir - assert_path_exists installed_exec + assert_path_exist installed_exec assert_equal mask, File.stat(installed_exec).mode unless win_platform? assert_match %r{generated by RubyGems}, File.read(installed_exec) @@ -549,7 +549,7 @@ gem 'other', version installer.wrappers = false installer.generate_bin - refute_path_exists util_inst_bindir + assert_path_not_exist util_inst_bindir end def test_generate_bin_symlink_no_perms @@ -658,7 +658,7 @@ gem 'other', version installer.generate_bin installed_exec = File.join util_inst_bindir, 'executable' - assert_path_exists installed_exec + assert_path_exist installed_exec @spec = Gem::Specification.new do |s| s.files = ['lib/code.rb'] @@ -701,7 +701,7 @@ gem 'other', version assert_directory_exists util_inst_bindir installed_exec = File.join(util_inst_bindir, 'executable') - assert_path_exists installed_exec + assert_path_exist installed_exec if symlink_supported? assert File.symlink?(installed_exec) @@ -946,22 +946,22 @@ gem 'other', version spec_file = File.join @gemhome, 'specifications', @spec.spec_name Gem.pre_install do - refute_path_exists cache_file, 'cache file must not exist yet' - refute_path_exists spec_file, 'spec file must not exist yet' + assert_path_not_exist cache_file, 'cache file must not exist yet' + assert_path_not_exist spec_file, 'spec file must not exist yet' true end Gem.post_build do - assert_path_exists gemdir, 'gem install dir must exist' - assert_path_exists rakefile, 'gem executable must exist' - refute_path_exists stub_exe, 'gem executable must not exist' - refute_path_exists spec_file, 'spec file must not exist yet' + assert_path_exist gemdir, 'gem install dir must exist' + assert_path_exist rakefile, 'gem executable must exist' + assert_path_not_exist stub_exe, 'gem executable must not exist' + assert_path_not_exist spec_file, 'spec file must not exist yet' true end Gem.post_install do - assert_path_exists cache_file, 'cache file must exist' - assert_path_exists spec_file, 'spec file must exist' + assert_path_exist cache_file, 'cache file must exist' + assert_path_exist spec_file, 'spec file must exist' end @newspec = nil @@ -972,21 +972,21 @@ gem 'other', version end assert_equal @spec, @newspec - assert_path_exists gemdir - assert_path_exists stub_exe, 'gem executable must exist' + assert_path_exist gemdir + assert_path_exist stub_exe, 'gem executable must exist' exe = File.join gemdir, 'bin', 'executable' - assert_path_exists exe + assert_path_exist exe exe_mode = File.stat(exe).mode & 0111 assert_equal 0111, exe_mode, "0%o" % exe_mode unless win_platform? - assert_path_exists File.join gemdir, 'lib', 'code.rb' + assert_path_exist File.join gemdir, 'lib', 'code.rb' - assert_path_exists rakefile + assert_path_exist rakefile assert_equal spec_file, @newspec.loaded_from - assert_path_exists spec_file + assert_path_exist spec_file assert_same installer, @post_build_hook_arg assert_same installer, @post_install_hook_arg @@ -1100,7 +1100,7 @@ gem 'other', version exe = File.join @gemhome, 'bin', 'executable' - assert_path_exists exe, "default gem's executable not installed" + assert_path_exist exe, "default gem's executable not installed" installer = util_setup_installer do |spec| spec.name = 'default' @@ -1165,7 +1165,7 @@ gem 'other', version end gemdir = File.join(@gemhome, 'gems', @spec.full_name) - assert_path_exists File.join gemdir, 'lib', 'code.rb' + assert_path_exist File.join gemdir, 'lib', 'code.rb' installer = util_setup_installer @@ -1188,8 +1188,8 @@ gem 'other', version end end - assert_path_exists File.join gemdir, 'lib', 'other.rb' - refute_path_exists File.join gemdir, 'lib', 'code.rb', + assert_path_exist File.join gemdir, 'lib', 'other.rb' + assert_path_not_exist File.join gemdir, 'lib', 'code.rb', "code.rb from prior install of same gem shouldn't remain here" end @@ -1204,7 +1204,7 @@ gem 'other', version end gem_dir = File.join(@gemhome, 'gems', 'missing_dep-1') - assert_path_exists gem_dir + assert_path_exist gem_dir end def test_install_build_root @@ -1231,8 +1231,8 @@ gem 'other', version assert_directory_exists File.join(Gem.dir, 'doc') assert_directory_exists File.join(Gem.dir, 'specifications') - assert_path_exists File.join @gemhome, 'cache', @spec.file_name - assert_path_exists File.join @gemhome, 'specifications', @spec.spec_name + assert_path_exist File.join @gemhome, 'cache', @spec.file_name + assert_path_exist File.join @gemhome, 'specifications', @spec.spec_name end def test_install_post_build_false @@ -1253,10 +1253,10 @@ gem 'other', version end spec_file = File.join @gemhome, 'specifications', @spec.spec_name - refute_path_exists spec_file + assert_path_not_exist spec_file gem_dir = File.join @gemhome, 'gems', @spec.full_name - refute_path_exists gem_dir + assert_path_not_exist gem_dir end def test_install_post_build_nil @@ -1271,10 +1271,10 @@ gem 'other', version end spec_file = File.join @gemhome, 'specifications', @spec.spec_name - assert_path_exists spec_file + assert_path_exist spec_file gem_dir = File.join @gemhome, 'gems', @spec.full_name - assert_path_exists gem_dir + assert_path_exist gem_dir end def test_install_pre_install_false @@ -1295,7 +1295,7 @@ gem 'other', version end spec_file = File.join @gemhome, 'specifications', @spec.spec_name - refute_path_exists spec_file + assert_path_not_exist spec_file end def test_install_pre_install_nil @@ -1310,7 +1310,7 @@ gem 'other', version end spec_file = File.join @gemhome, 'specifications', @spec.spec_name - assert_path_exists spec_file + assert_path_exist spec_file end def test_install_with_message @@ -1364,7 +1364,7 @@ gem 'other', version expected_makefile = File.join gemhome2, 'gems', @spec.full_name, 'Makefile' - assert_path_exists expected_makefile + assert_path_exist expected_makefile end def test_install_extension_dir_is_removed_on_reinstall @@ -1393,7 +1393,7 @@ gem 'other', version write_file should_be_removed do |io| io.write "DELETE ME ON REINSTALL" end - assert_path_exists should_be_removed + assert_path_exist should_be_removed # reinstall the gem, this is also the same as pristine use_ui @ui do @@ -1401,7 +1401,7 @@ gem 'other', version installer.install end - refute_path_exists should_be_removed + assert_path_not_exist should_be_removed end def test_install_user_extension_dir @@ -1429,9 +1429,9 @@ gem 'other', version expected_makefile = File.join Gem.user_dir, 'gems', @spec.full_name, 'Makefile' - assert_path_exists expected_makefile - assert_path_exists expected_extension_dir - refute_path_exists File.join expected_extension_dir, 'gem_make.out' + assert_path_exist expected_makefile + assert_path_exist expected_extension_dir + assert_path_not_exist File.join expected_extension_dir, 'gem_make.out' end def test_find_lib_file_after_install @@ -1510,16 +1510,16 @@ gem 'other', version RUBY end - refute_path_exists File.join @spec.gem_dir, rb - refute_path_exists File.join @spec.gem_dir, rb2 + assert_path_not_exist File.join @spec.gem_dir, rb + assert_path_not_exist File.join @spec.gem_dir, rb2 use_ui @ui do path = Gem::Package.build @spec installer = Gem::Installer.at path installer.install end - assert_path_exists File.join @spec.gem_dir, rb - assert_path_exists File.join @spec.gem_dir, rb2 + assert_path_exist File.join @spec.gem_dir, rb + assert_path_exist File.join @spec.gem_dir, rb2 end def test_install_extension_flat @@ -1548,14 +1548,14 @@ gem 'other', version end so = File.join(@spec.gem_dir, "#{@spec.name}.#{RbConfig::CONFIG["DLEXT"]}") - refute_path_exists so + assert_path_not_exist so use_ui @ui do path = Gem::Package.build @spec installer = Gem::Installer.at path installer.install end - assert_path_exists so + assert_path_exist so rescue puts '-' * 78 puts File.read File.join(@gemhome, 'gems', 'a-2', 'Makefile') @@ -1992,14 +1992,14 @@ gem 'other', version installer.unpack dest end - assert_path_exists File.join dest, 'lib', 'code.rb' - assert_path_exists File.join dest, 'bin', 'executable' + assert_path_exist File.join dest, 'lib', 'code.rb' + assert_path_exist File.join dest, 'bin', 'executable' end def test_write_build_info_file installer = setup_base_installer - refute_path_exists @spec.build_info_file + assert_path_not_exist @spec.build_info_file installer.build_args = %w[ --with-libyaml-dir /usr/local/Cellar/libyaml/0.1.4 @@ -2007,7 +2007,7 @@ gem 'other', version installer.write_build_info_file - assert_path_exists @spec.build_info_file + assert_path_exist @spec.build_info_file expected = "--with-libyaml-dir\n/usr/local/Cellar/libyaml/0.1.4\n" @@ -2017,11 +2017,11 @@ gem 'other', version def test_write_build_info_file_empty installer = setup_base_installer - refute_path_exists @spec.build_info_file + assert_path_not_exist @spec.build_info_file installer.write_build_info_file - refute_path_exists @spec.build_info_file + assert_path_not_exist @spec.build_info_file end def test_write_build_info_file_install_dir @@ -2034,8 +2034,8 @@ gem 'other', version installer.write_build_info_file - refute_path_exists @spec.build_info_file - assert_path_exists \ + assert_path_not_exist @spec.build_info_file + assert_path_exist \ File.join("#{@gemhome}2", 'build_info', "#{@spec.full_name}.info") end @@ -2045,27 +2045,27 @@ gem 'other', version gem = File.join @gemhome, @spec.file_name FileUtils.mv cache_file, gem - refute_path_exists cache_file + assert_path_not_exist cache_file installer = Gem::Installer.at gem installer.gem_home = @gemhome installer.write_cache_file - assert_path_exists cache_file + assert_path_exist cache_file end def test_write_spec @spec = setup_base_spec FileUtils.rm @spec.spec_file - refute_path_exists @spec.spec_file + assert_path_not_exist @spec.spec_file installer = Gem::Installer.for_spec @spec installer.gem_home = @gemhome installer.write_spec - assert_path_exists @spec.spec_file + assert_path_exist @spec.spec_file loaded = Gem::Specification.load @spec.spec_file @@ -2077,7 +2077,7 @@ gem 'other', version def test_write_spec_writes_cached_spec @spec = setup_base_spec FileUtils.rm @spec.spec_file - refute_path_exists @spec.spec_file + assert_path_not_exist @spec.spec_file @spec.files = %w[a.rb b.rb c.rb] @@ -2120,7 +2120,7 @@ gem 'other', version assert_directory_exists File.join(@spec.gem_dir, 'bin') installed_exec = File.join @spec.gem_dir, 'bin', 'executable' - assert_path_exists installed_exec + assert_path_exist installed_exec assert_directory_exists File.join(Gem.default_dir, 'specifications') assert_directory_exists File.join(Gem.default_dir, 'specifications', 'default') @@ -2132,7 +2132,7 @@ gem 'other', version assert_directory_exists util_inst_bindir installed_exec = File.join util_inst_bindir, 'executable' - assert_path_exists installed_exec + assert_path_exist installed_exec wrapper = File.read installed_exec @@ -2158,7 +2158,7 @@ gem 'other', version assert_directory_exists util_inst_bindir installed_exec = File.join util_inst_bindir, 'executable' - assert_path_exists installed_exec + assert_path_exist installed_exec wrapper = File.read installed_exec assert_match %r{generated by RubyGems}, wrapper @@ -2184,7 +2184,7 @@ gem 'other', version assert_directory_exists File.join(@spec.gem_dir, 'exe') installed_exec = File.join @spec.gem_dir, 'exe', 'executable' - assert_path_exists installed_exec + assert_path_exist installed_exec assert_directory_exists File.join(Gem.default_dir, 'specifications') assert_directory_exists File.join(Gem.default_dir, 'specifications', 'default') diff --git a/test/rubygems/test_gem_package.rb b/test/rubygems/test_gem_package.rb index 3000333b9c..f0a2535f4c 100644 --- a/test/rubygems/test_gem_package.rb +++ b/test/rubygems/test_gem_package.rb @@ -240,7 +240,7 @@ class TestGemPackage < Gem::Package::TarTestCase package.build assert_equal Gem::VERSION, spec.rubygems_version - assert_path_exists spec.file_name + assert_path_exist spec.file_name reader = Gem::Package.new spec.file_name assert_equal spec, reader.spec @@ -279,7 +279,7 @@ class TestGemPackage < Gem::Package::TarTestCase package.build assert_equal Gem::VERSION, spec.rubygems_version - assert_path_exists spec.file_name + assert_path_exist spec.file_name reader = Gem::Package.new spec.file_name assert reader.verify @@ -322,7 +322,7 @@ class TestGemPackage < Gem::Package::TarTestCase package.build assert_equal Gem::VERSION, spec.rubygems_version - assert_path_exists spec.file_name + assert_path_exist spec.file_name reader = Gem::Package.new spec.file_name assert reader.verify @@ -385,7 +385,7 @@ class TestGemPackage < Gem::Package::TarTestCase package.build assert_equal Gem::VERSION, spec.rubygems_version - assert_path_exists spec.file_name + assert_path_exist spec.file_name reader = Gem::Package.new spec.file_name assert reader.verify @@ -422,7 +422,7 @@ class TestGemPackage < Gem::Package::TarTestCase package.build assert_equal Gem::VERSION, spec.rubygems_version - assert_path_exists spec.file_name + assert_path_exist spec.file_name reader = Gem::Package.new spec.file_name assert reader.verify @@ -476,7 +476,7 @@ class TestGemPackage < Gem::Package::TarTestCase package.extract_files @destination extracted = File.join @destination, 'lib/code.rb' - assert_path_exists extracted + assert_path_exist extracted mask = 0100666 & (~File.umask) @@ -507,7 +507,7 @@ class TestGemPackage < Gem::Package::TarTestCase package.extract_files @destination - assert_path_exists @destination + assert_path_exist @destination end def test_extract_tar_gz_absolute @@ -550,7 +550,7 @@ class TestGemPackage < Gem::Package::TarTestCase end extracted = File.join @destination, 'lib/foo.rb' - assert_path_exists extracted + assert_path_exist extracted assert_equal '../relative.rb', File.readlink(extracted) assert_equal 'hi', @@ -612,7 +612,7 @@ class TestGemPackage < Gem::Package::TarTestCase package.extract_tar_gz tgz_io, destination_subdir end - assert_path_exists destination_user_subdir + assert_path_exist destination_user_subdir if Gem::Package::PathError === e assert_equal("installing into parent path #{destination_user_subdir} of " + @@ -638,10 +638,10 @@ class TestGemPackage < Gem::Package::TarTestCase package.extract_tar_gz tgz_io, @destination extracted = File.join @destination, 'lib/foo.rb' - assert_path_exists extracted + assert_path_exist extracted extracted = File.join @destination, 'lib/foo' - assert_path_exists extracted + assert_path_exist extracted end def test_extract_tar_gz_dot_slash @@ -656,7 +656,7 @@ class TestGemPackage < Gem::Package::TarTestCase package.extract_tar_gz tgz_io, @destination extracted = File.join @destination, 'dot_slash.rb' - assert_path_exists extracted + assert_path_exist extracted end def test_extract_tar_gz_dot_file @@ -671,7 +671,7 @@ class TestGemPackage < Gem::Package::TarTestCase package.extract_tar_gz tgz_io, @destination extracted = File.join @destination, '.dot_file.rb' - assert_path_exists extracted + assert_path_exist extracted end if Gem.win_platform? @@ -687,7 +687,7 @@ class TestGemPackage < Gem::Package::TarTestCase package.extract_tar_gz tgz_io, @destination.upcase extracted = File.join @destination, 'foo/file.rb' - assert_path_exists extracted + assert_path_exist extracted end end diff --git a/test/rubygems/test_gem_package_old.rb b/test/rubygems/test_gem_package_old.rb index 8c4c20006b..d9f5d45fef 100644 --- a/test/rubygems/test_gem_package_old.rb +++ b/test/rubygems/test_gem_package_old.rb @@ -36,7 +36,7 @@ unless Gem.java_platform? # jruby can't require the simple_gem file @package.extract_files @destination extracted = File.join @destination, 'lib/foo.rb' - assert_path_exists extracted + assert_path_exist extracted mask = 0100644 & (~File.umask) diff --git a/test/rubygems/test_gem_package_task.rb b/test/rubygems/test_gem_package_task.rb index ee9b8d44d4..f63ef0de36 100644 --- a/test/rubygems/test_gem_package_task.rb +++ b/test/rubygems/test_gem_package_task.rb @@ -40,7 +40,7 @@ class TestGemPackageTask < Gem::TestCase Rake.application['package'].invoke - assert_path_exists 'pkg/pkgr-1.2.3.gem' + assert_path_exist 'pkg/pkgr-1.2.3.gem' end ensure RakeFileUtils.verbose_flag = original_rake_fileutils_verbosity diff --git a/test/rubygems/test_gem_rdoc.rb b/test/rubygems/test_gem_rdoc.rb index 13fd4ba40b..779753e9cf 100644 --- a/test/rubygems/test_gem_rdoc.rb +++ b/test/rubygems/test_gem_rdoc.rb @@ -84,7 +84,7 @@ class TestGemRDoc < Gem::TestCase refute @hook.rdoc_installed? refute @hook.ri_installed? - assert_path_exists @a.doc_dir + assert_path_exist @a.doc_dir end def test_remove_unwritable @@ -113,7 +113,7 @@ class TestGemRDoc < Gem::TestCase def test_setup @hook.setup - assert_path_exists @a.doc_dir + assert_path_exist @a.doc_dir end def test_setup_unwritable diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb index b032f1613b..5a64112f95 100644 --- a/test/rubygems/test_gem_remote_fetcher.rb +++ b/test/rubygems/test_gem_remote_fetcher.rb @@ -184,7 +184,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg== assert_equal 'hello', data - refute_path_exists path + assert_path_not_exist path end def util_fuck_with_fetcher(data, blow = false) diff --git a/test/rubygems/test_gem_request_set.rb b/test/rubygems/test_gem_request_set.rb index e2f0bf252b..d1c07d931c 100644 --- a/test/rubygems/test_gem_request_set.rb +++ b/test/rubygems/test_gem_request_set.rb @@ -64,8 +64,8 @@ class TestGemRequestSet < Gem::TestCase end assert_includes installed, 'a-2' - assert_path_exists File.join @gemhome, 'gems', 'a-2' - assert_path_exists 'gem.deps.rb.lock' + assert_path_exist File.join @gemhome, 'gems', 'a-2' + assert_path_exist 'gem.deps.rb.lock' assert rs.remote refute done_installing_ran @@ -100,7 +100,7 @@ Gems to install: end util_clear_gems - refute_path_exists File.join Gem.dir, 'gems', 'a-2' + assert_path_not_exist File.join Gem.dir, 'gems', 'a-2' rs = Gem::RequestSet.new installed = [] @@ -119,7 +119,7 @@ Gems to install: end assert_includes installed, 'a-2' - refute_path_exists File.join Gem.dir, 'gems', 'a-2' + assert_path_not_exist File.join Gem.dir, 'gems', 'a-2' end def test_install_from_gemdeps_local @@ -179,8 +179,8 @@ DEPENDENCIES assert_includes installed, 'b-1' assert_includes installed, 'a-1' - assert_path_exists File.join @gemhome, 'specifications', 'a-1.gemspec' - assert_path_exists File.join @gemhome, 'specifications', 'b-1.gemspec' + assert_path_exist File.join @gemhome, 'specifications', 'a-1.gemspec' + assert_path_exist File.join @gemhome, 'specifications', 'b-1.gemspec' end def test_install_from_gemdeps_complex_dependencies @@ -232,7 +232,7 @@ end assert_includes installed, 'z-1.0.3' - assert_path_exists File.join @gemhome, 'specifications', 'z-1.0.3.gemspec' + assert_path_exist File.join @gemhome, 'specifications', 'z-1.0.3.gemspec' end def test_install_from_gemdeps_version_mismatch @@ -525,8 +525,8 @@ ruby "0" assert_equal %w[b-1 a-1], installers.map {|installer| installer.spec.full_name } - assert_path_exists File.join @gemhome, 'specifications', 'a-1.gemspec' - assert_path_exists File.join @gemhome, 'specifications', 'b-1.gemspec' + assert_path_exist File.join @gemhome, 'specifications', 'a-1.gemspec' + assert_path_exist File.join @gemhome, 'specifications', 'b-1.gemspec' assert_equal %w[b-1 a-1], installed.map {|s| s.full_name } @@ -548,8 +548,8 @@ ruby "0" assert_equal @tempdir, ENV['GEM_HOME'] end - assert_path_exists File.join @tempdir, 'specifications', 'a-1.gemspec' - assert_path_exists File.join @tempdir, 'specifications', 'b-1.gemspec' + assert_path_exist File.join @tempdir, 'specifications', 'a-1.gemspec' + assert_path_exist File.join @tempdir, 'specifications', 'b-1.gemspec' assert_equal %w[b-1 a-1], installed.map {|s| s.full_name } end diff --git a/test/rubygems/test_gem_request_set_lockfile.rb b/test/rubygems/test_gem_request_set_lockfile.rb index 44a47f2e00..6fe0f00f02 100644 --- a/test/rubygems/test_gem_request_set_lockfile.rb +++ b/test/rubygems/test_gem_request_set_lockfile.rb @@ -443,7 +443,7 @@ DEPENDENCIES gem_deps_lock_file = "#{@gem_deps_file}.lock" - assert_path_exists gem_deps_lock_file + assert_path_exist gem_deps_lock_file refute_empty File.read gem_deps_lock_file end @@ -461,7 +461,7 @@ DEPENDENCIES lockfile.write end - assert_path_exists gem_deps_lock_file + assert_path_exist gem_deps_lock_file assert_equal 'hello', File.read(gem_deps_lock_file) end diff --git a/test/rubygems/test_gem_resolver_git_set.rb b/test/rubygems/test_gem_resolver_git_set.rb index 6d048b3772..7b0efa0680 100644 --- a/test/rubygems/test_gem_resolver_git_set.rb +++ b/test/rubygems/test_gem_resolver_git_set.rb @@ -51,7 +51,7 @@ class TestGemResolverGitSet < Gem::TestCase assert @set.need_submodules[repository] - refute_path_exists spec.source.repo_cache_dir + assert_path_not_exist spec.source.repo_cache_dir end def test_find_all diff --git a/test/rubygems/test_gem_resolver_git_specification.rb b/test/rubygems/test_gem_resolver_git_specification.rb index c2ed1b502d..88729c4d20 100644 --- a/test/rubygems/test_gem_resolver_git_specification.rb +++ b/test/rubygems/test_gem_resolver_git_specification.rb @@ -92,7 +92,7 @@ class TestGemResolverGitSpecification < Gem::TestCase git_spec.install({}) - assert_path_exists File.join git_spec.spec.extension_dir, 'b.rb' + assert_path_exist File.join git_spec.spec.extension_dir, 'b.rb' end def test_install_installed diff --git a/test/rubygems/test_gem_resolver_index_specification.rb b/test/rubygems/test_gem_resolver_index_specification.rb index 702d26777b..382f95c004 100644 --- a/test/rubygems/test_gem_resolver_index_specification.rb +++ b/test/rubygems/test_gem_resolver_index_specification.rb @@ -46,7 +46,7 @@ class TestGemResolverIndexSpecification < Gem::TestCase called = installer end - assert_path_exists File.join @gemhome, 'specifications', 'a-2.gemspec' + assert_path_exist File.join @gemhome, 'specifications', 'a-2.gemspec' assert_kind_of Gem::Installer, called end diff --git a/test/rubygems/test_gem_resolver_local_specification.rb b/test/rubygems/test_gem_resolver_local_specification.rb index 0dcc436b29..67b8f34cc1 100644 --- a/test/rubygems/test_gem_resolver_local_specification.rb +++ b/test/rubygems/test_gem_resolver_local_specification.rb @@ -24,7 +24,7 @@ class TestGemResolverLocalSpecification < Gem::TestCase called = installer end - assert_path_exists File.join @gemhome, 'specifications', 'a-2.gemspec' + assert_path_exist File.join @gemhome, 'specifications', 'a-2.gemspec' assert_kind_of Gem::Installer, called end diff --git a/test/rubygems/test_gem_resolver_specification.rb b/test/rubygems/test_gem_resolver_specification.rb index e395c473ab..8b50bf91bd 100644 --- a/test/rubygems/test_gem_resolver_specification.rb +++ b/test/rubygems/test_gem_resolver_specification.rb @@ -26,7 +26,7 @@ class TestGemResolverSpecification < Gem::TestCase a_spec.install :install_dir => gemhome - assert_path_exists File.join gemhome, 'gems', a.full_name + assert_path_exist File.join gemhome, 'gems', a.full_name expected = File.join gemhome, 'specifications', a.spec_name diff --git a/test/rubygems/test_gem_security.rb b/test/rubygems/test_gem_security.rb index 92f9e55b21..7548f407d1 100644 --- a/test/rubygems/test_gem_security.rb +++ b/test/rubygems/test_gem_security.rb @@ -265,7 +265,7 @@ class TestGemSecurity < Gem::TestCase @SEC.write key, path - assert_path_exists path + assert_path_exist path key_from_file = File.read path @@ -281,7 +281,7 @@ class TestGemSecurity < Gem::TestCase @SEC.write key, path, 0600, passphrase - assert_path_exists path + assert_path_exist path key_from_file = OpenSSL::PKey::RSA.new File.read(path), passphrase @@ -299,7 +299,7 @@ class TestGemSecurity < Gem::TestCase @SEC.write key, path, 0600, passphrase, cipher - assert_path_exists path + assert_path_exist path key_file_contents = File.read(path) diff --git a/test/rubygems/test_gem_security_signer.rb b/test/rubygems/test_gem_security_signer.rb index 8a09f97f26..ac6c203c43 100644 --- a/test/rubygems/test_gem_security_signer.rb +++ b/test/rubygems/test_gem_security_signer.rb @@ -165,7 +165,7 @@ toqvglr0kdbknSRRjBVLK6tsgr07aLT9gNP7mTW2PA== expired_path = File.join Gem.user_home, '.gem', "gem-public_cert.pem.expired.#{expiry}" - assert_path_exists expired_path + assert_path_exist expired_path assert_equal EXPIRED_CERT.to_pem, File.read(expired_path) end diff --git a/test/rubygems/test_gem_security_trust_dir.rb b/test/rubygems/test_gem_security_trust_dir.rb index 201de9d36b..057557ee96 100644 --- a/test/rubygems/test_gem_security_trust_dir.rb +++ b/test/rubygems/test_gem_security_trust_dir.rb @@ -53,7 +53,7 @@ class TestGemSecurityTrustDir < Gem::TestCase trusted = @trust_dir.cert_path PUBLIC_CERT - assert_path_exists trusted + assert_path_exist trusted mask = 0100600 & (~File.umask) @@ -63,11 +63,11 @@ class TestGemSecurityTrustDir < Gem::TestCase end def test_verify - refute_path_exists @dest_dir + assert_path_not_exist @dest_dir @trust_dir.verify - assert_path_exists @dest_dir + assert_path_exist @dest_dir mask = 040700 & (~File.umask) mask |= 0200000 if /aix/ =~ RUBY_PLATFORM diff --git a/test/rubygems/test_gem_source_git.rb b/test/rubygems/test_gem_source_git.rb index 2a082dec51..a42424b98a 100644 --- a/test/rubygems/test_gem_source_git.rb +++ b/test/rubygems/test_gem_source_git.rb @@ -24,7 +24,7 @@ class TestGemSourceGit < Gem::TestCase def test_checkout @source.checkout - assert_path_exists File.join @source.install_dir, 'a.gemspec' + assert_path_exist File.join @source.install_dir, 'a.gemspec' end def test_checkout_master @@ -39,7 +39,7 @@ class TestGemSourceGit < Gem::TestCase @source.checkout - assert_path_exists File.join @source.install_dir, 'b.gemspec' + assert_path_exist File.join @source.install_dir, 'b.gemspec' end def test_checkout_local @@ -49,7 +49,7 @@ class TestGemSourceGit < Gem::TestCase install_dir = File.join Gem.dir, 'bundler', 'gems', "a-#{@head[0..11]}" - refute_path_exists File.join install_dir, 'a.gemspec' + assert_path_not_exist File.join install_dir, 'a.gemspec' end def test_checkout_local_cached @@ -59,7 +59,7 @@ class TestGemSourceGit < Gem::TestCase @source.checkout - assert_path_exists File.join @source.install_dir, 'a.gemspec' + assert_path_exist File.join @source.install_dir, 'a.gemspec' end def test_checkout_submodules @@ -76,14 +76,14 @@ class TestGemSourceGit < Gem::TestCase source.checkout - assert_path_exists File.join source.install_dir, 'a.gemspec' - assert_path_exists File.join source.install_dir, 'b/b.gemspec' + assert_path_exist File.join source.install_dir, 'a.gemspec' + assert_path_exist File.join source.install_dir, 'b/b.gemspec' end def test_cache assert @source.cache - assert_path_exists @source.repo_cache_dir + assert_path_exist @source.repo_cache_dir Dir.chdir @source.repo_cache_dir do assert_equal @head, Gem::Util.popen(@git, 'rev-parse', 'master').strip @@ -95,7 +95,7 @@ class TestGemSourceGit < Gem::TestCase @source.cache - refute_path_exists @source.repo_cache_dir + assert_path_not_exist @source.repo_cache_dir end def test_dir_shortref diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index d4656c0d30..6bcc36bd1a 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -1473,7 +1473,7 @@ dependencies: [] skip "extensions don't quite work on jruby" if Gem.java_platform? ext_spec - refute_path_exists @ext.extension_dir, 'sanity check' + assert_path_not_exist @ext.extension_dir, 'sanity check' refute_empty @ext.extensions, 'sanity check' extconf_rb = File.join @ext.gem_dir, @ext.extensions.first @@ -1491,7 +1491,7 @@ dependencies: [] @ext.build_extensions - assert_path_exists @ext.extension_dir + assert_path_exist @ext.extension_dir end def test_default_spec_stub_is_marked_default @@ -1520,7 +1520,7 @@ dependencies: [] @ext.build_extensions gem_make_out = File.join @ext.extension_dir, 'gem_make.out' - refute_path_exists gem_make_out + assert_path_not_exist gem_make_out end def test_build_extensions_default_gem @@ -1541,7 +1541,7 @@ dependencies: [] spec.build_extensions - refute_path_exists spec.extension_dir + assert_path_not_exist spec.extension_dir end def test_build_extensions_error @@ -1582,7 +1582,7 @@ dependencies: [] FileUtils.chmod 0555, File.join(@ext.base_dir, 'extensions') @ext.build_extensions - refute_path_exists @ext.extension_dir + assert_path_not_exist @ext.extension_dir ensure unless ($DEBUG or win_platform? or Process.uid.zero? or Gem.java_platform?) FileUtils.chmod 0755, File.join(@ext.base_dir, 'extensions') @@ -1616,18 +1616,18 @@ dependencies: [] @ext.build_extensions gem_make_out = File.join @ext.extension_dir, 'gem_make.out' - refute_path_exists gem_make_out + assert_path_not_exist gem_make_out ensure FileUtils.chmod 0755, @gemhome end def test_build_extensions_none - refute_path_exists @a1.extension_dir, 'sanity check' + assert_path_not_exist @a1.extension_dir, 'sanity check' assert_empty @a1.extensions, 'sanity check' @a1.build_extensions - refute_path_exists @a1.extension_dir + assert_path_not_exist @a1.extension_dir end def test_build_extensions_preview @@ -1654,7 +1654,7 @@ dependencies: [] @ext.build_extensions gem_make_out = File.join @ext.extension_dir, 'gem_make.out' - assert_path_exists gem_make_out + assert_path_exist gem_make_out end def test_contains_requirable_file_eh diff --git a/test/rubygems/test_gem_uninstaller.rb b/test/rubygems/test_gem_uninstaller.rb index 1ca4991d1e..212a0e426b 100644 --- a/test/rubygems/test_gem_uninstaller.rb +++ b/test/rubygems/test_gem_uninstaller.rb @@ -54,7 +54,7 @@ class TestGemUninstaller < Gem::InstallerTestCase uninstaller.remove_all [@spec] end - refute_path_exists @spec.gem_dir + assert_path_not_exist @spec.gem_dir end def test_remove_executables_force_keep @@ -149,7 +149,7 @@ class TestGemUninstaller < Gem::InstallerTestCase assert_equal expected, e.message - assert_path_exists @spec.gem_dir + assert_path_exist @spec.gem_dir end def test_remove_symlinked_gem_home @@ -166,7 +166,7 @@ class TestGemUninstaller < Gem::InstallerTestCase uninstaller.remove @spec end - refute_path_exists @spec.gem_dir + assert_path_not_exist @spec.gem_dir end end @@ -297,7 +297,7 @@ class TestGemUninstaller < Gem::InstallerTestCase uninstaller.uninstall - refute_path_exists spec.gem_dir + assert_path_not_exist spec.gem_dir end def test_uninstall_extension @@ -318,12 +318,12 @@ create_makefile '#{@spec.name}' installer.install end - assert_path_exists @spec.extension_dir, 'sanity check' + assert_path_exist @spec.extension_dir, 'sanity check' uninstaller = Gem::Uninstaller.new @spec.name, :executables => true uninstaller.uninstall - refute_path_exists @spec.extension_dir + assert_path_not_exist @spec.extension_dir end def test_uninstall_nonexistent @@ -371,16 +371,16 @@ create_makefile '#{@spec.name}' gem_dir = File.join @user_spec.gem_dir Gem.pre_uninstall do - assert_path_exists gem_dir + assert_path_exist gem_dir end Gem.post_uninstall do - refute_path_exists gem_dir + assert_path_not_exist gem_dir end uninstaller.uninstall - refute_path_exists gem_dir + assert_path_not_exist gem_dir assert_same uninstaller, @pre_uninstall_hook_arg assert_same uninstaller, @post_uninstall_hook_arg diff --git a/test/rubygems/test_require.rb b/test/rubygems/test_require.rb index 8c7d06edc3..6af27c5d44 100644 --- a/test/rubygems/test_require.rb +++ b/test/rubygems/test_require.rb @@ -753,12 +753,12 @@ class TestGemRequire < Gem::TestCase spec.files += ["extconf.rb", "depend", "#{name}.c"] so = File.join(spec.gem_dir, "#{name}.#{RbConfig::CONFIG["DLEXT"]}") - refute_path_exists so + assert_path_not_exist so path = Gem::Package.build spec installer = Gem::Installer.at path installer.install - assert_path_exists so + assert_path_exist so spec.gem_dir end -- cgit v1.2.3