ruby-changes:66282
From: Nobuyoshi <ko1@a...>
Date: Fri, 21 May 2021 15:55:35 +0900 (JST)
Subject: [ruby-changes:66282] f18a0b7654 (master): [ruby/rdoc] Follow-up rubygems
https://git.ruby-lang.org/ruby.git/commit/?id=f18a0b7654 From f18a0b7654d471101b207e7fe553e12a25398e45 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 15 May 2021 01:08:33 +0900 Subject: [ruby/rdoc] Follow-up rubygems Use test-unit assertions instead of minitest. https://github.com/ruby/rdoc/commit/d6a6209d7f --- test/rdoc/test_rdoc_rubygems_hook.rb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/test/rdoc/test_rdoc_rubygems_hook.rb b/test/rdoc/test_rdoc_rubygems_hook.rb index ab7d95c..4e4451b 100644 --- a/test/rdoc/test_rdoc_rubygems_hook.rb +++ b/test/rdoc/test_rdoc_rubygems_hook.rb @@ -3,6 +3,12 @@ require 'rubygems/test_case' https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_rubygems_hook.rb#L3 require 'rdoc/rubygems_hook' class TestRDocRubygemsHook < Gem::TestCase + unless method_defined?(:assert_path_exist) + alias assert_path_exist assert_path_exists + end + unless method_defined?(:assert_path_not_exist) + alias assert_path_not_exist refute_path_exists + end def setup super @@ -165,8 +171,8 @@ class TestRDocRubygemsHook < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_rubygems_hook.rb#L171 @hook.generate - refute_path_exists File.join(@a.doc_dir('rdoc'), 'index.html') - assert_path_exists File.join(@a.doc_dir('ri'), 'cache.ri') + assert_path_not_exist File.join(@a.doc_dir('rdoc'), 'index.html') + assert_path_exist File.join(@a.doc_dir('ri'), 'cache.ri') end def test_generate_no_overwrite @@ -176,8 +182,8 @@ class TestRDocRubygemsHook < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_rubygems_hook.rb#L182 @hook.generate - refute_path_exists File.join(@a.doc_dir('rdoc'), 'index.html') - refute_path_exists File.join(@a.doc_dir('ri'), 'cache.ri') + assert_path_not_exist File.join(@a.doc_dir('rdoc'), 'index.html') + assert_path_not_exist File.join(@a.doc_dir('ri'), 'cache.ri') end def test_new_rdoc @@ -201,7 +207,7 @@ class TestRDocRubygemsHook < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_rubygems_hook.rb#L207 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 @@ -231,7 +237,7 @@ class TestRDocRubygemsHook < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_rubygems_hook.rb#L237 def test_setup @hook.setup - assert_path_exists @a.doc_dir + assert_path_exist @a.doc_dir end def test_setup_unwritable -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/