diff options
author | Hiroshi SHIBATA <[email protected]> | 2020-05-25 21:05:45 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2021-05-12 17:24:43 +0900 |
commit | 3948be350312b908ea3ecf32ecf1adf420fe74ca (patch) | |
tree | 8f01de8e25e201e16a4f15b1124f7251a892d0a4 /test/rubygems/test_gem_commands_setup_command.rb | |
parent | 81d793a9216303f70143b13a88c924c22ce4af6d (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_setup_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_setup_command.rb | 42 |
1 files changed, 21 insertions, 21 deletions
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 |