From d3da585a886bc2971eb787ebd064ac6902b0cf43 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sun, 11 Aug 2019 06:12:46 +0900 Subject: [PATCH 1/7] Use capture_output instead of capture_io. It's preparation for migrating test-unit on upstream. --- test/rdoc/helper.rb | 2 +- test/rdoc/test_rdoc_context.rb | 4 +- test/rdoc/test_rdoc_context_section.rb | 2 +- test/rdoc/test_rdoc_encoding.rb | 4 +- test/rdoc/test_rdoc_markup_pre_process.rb | 2 +- test/rdoc/test_rdoc_options.rb | 60 +++++++++++------------ test/rdoc/test_rdoc_parser.rb | 2 +- test/rdoc/test_rdoc_parser_c.rb | 10 ++-- test/rdoc/test_rdoc_parser_ruby.rb | 4 +- test/rdoc/test_rdoc_rdoc.rb | 16 +++--- test/rdoc/test_rdoc_ri_driver.rb | 56 ++++++++++----------- test/rdoc/test_rdoc_task.rb | 6 +-- test/rdoc/test_rdoc_text.rb | 2 +- 13 files changed, 85 insertions(+), 85 deletions(-) diff --git a/test/rdoc/helper.rb b/test/rdoc/helper.rb index 34849a2e2c..5589197b34 100644 --- a/test/rdoc/helper.rb +++ b/test/rdoc/helper.rb @@ -191,7 +191,7 @@ def verb *parts ## # run capture_io with setting $VERBOSE = true - def verbose_capture_io + def verbose_capture_output capture_output do begin orig_verbose = $VERBOSE diff --git a/test/rdoc/test_rdoc_context.rb b/test/rdoc/test_rdoc_context.rb index be17496f40..ecdb3cbd67 100644 --- a/test/rdoc/test_rdoc_context.rb +++ b/test/rdoc/test_rdoc_context.rb @@ -232,7 +232,7 @@ def test_add_method_duplicate meth2.record_location @store.add_file 'second.rb' meth2.comment = comment 'second' - _, err = verbose_capture_io do + _, err = verbose_capture_output do @context.add_method meth2 end @@ -260,7 +260,7 @@ def test_add_method_duplicate_loading meth2.record_location @store.add_file 'second.rb' meth2.comment = comment 'second' - _, err = verbose_capture_io do + _, err = verbose_capture_output do @context.add_method meth2 end diff --git a/test/rdoc/test_rdoc_context_section.rb b/test/rdoc/test_rdoc_context_section.rb index ac1d9f9be8..c520ad05a5 100644 --- a/test/rdoc/test_rdoc_context_section.rb +++ b/test/rdoc/test_rdoc_context_section.rb @@ -144,7 +144,7 @@ def test_remove_comment_document end def test_sequence - _, err = verbose_capture_io do + _, err = verbose_capture_output do assert_match(/\ASEC\d{5}\Z/, @s.sequence) end diff --git a/test/rdoc/test_rdoc_encoding.rb b/test/rdoc/test_rdoc_encoding.rb index 41a8465395..f10de8c1e3 100644 --- a/test/rdoc/test_rdoc_encoding.rb +++ b/test/rdoc/test_rdoc_encoding.rb @@ -54,7 +54,7 @@ def test_class_read_file_encoding_fail contents = :junk - _, err = verbose_capture_io do + _, err = verbose_capture_output do contents = RDoc::Encoding.read_file @tempfile.path, Encoding::US_ASCII end @@ -97,7 +97,7 @@ def test_class_read_file_encoding_invalid @tempfile.flush contents = :junk - _, err = verbose_capture_io do + _, err = verbose_capture_output do contents = RDoc::Encoding.read_file @tempfile.path, Encoding::UTF_8 end diff --git a/test/rdoc/test_rdoc_markup_pre_process.rb b/test/rdoc/test_rdoc_markup_pre_process.rb index b4acd4ebe3..cc5bdc3abf 100644 --- a/test/rdoc/test_rdoc_markup_pre_process.rb +++ b/test/rdoc/test_rdoc_markup_pre_process.rb @@ -73,7 +73,7 @@ def test_include_file_encoding_incompatible def test_include_file_in_other_directory content = nil - out, err = capture_io do + out, err = capture_output do content = @pp.include_file "test.txt", '', nil end diff --git a/test/rdoc/test_rdoc_options.rb b/test/rdoc/test_rdoc_options.rb index ade4d0bedb..e3bbf034ff 100644 --- a/test/rdoc/test_rdoc_options.rb +++ b/test/rdoc/test_rdoc_options.rb @@ -20,7 +20,7 @@ def test_check_files skip "assumes UNIX permission model" if /mswin|mingw/ =~ RUBY_PLATFORM skip "assumes that euid is not root" if Process.euid == 0 - out, err = capture_io do + out, err = capture_output do temp_dir do FileUtils.touch 'unreadable' FileUtils.chmod 0, 'unreadable' @@ -40,7 +40,7 @@ def test_check_files def test_check_files_warn @options.verbosity = 2 - out, err = verbose_capture_io do + out, err = verbose_capture_output do @options.files = %w[nonexistent] @options.check_files @@ -218,7 +218,7 @@ def test_parse_coverage_level_1 end def test_parse_dash_p - out, err = capture_io do + out, err = capture_output do @options.parse %w[-p] end @@ -230,7 +230,7 @@ def test_parse_dash_p end def test_parse_dash_p_files - out, err = capture_io do + out, err = capture_output do @options.parse ['-p', File.expand_path(__FILE__)] end @@ -253,7 +253,7 @@ def test_parse_deprecated dep_hash = RDoc::Options::DEPRECATED options = dep_hash.keys.sort - out, err = capture_io do + out, err = capture_output do @options.parse options end @@ -278,7 +278,7 @@ def test_parse_encoding end def test_parse_encoding_invalid - out, err = capture_io do + out, err = capture_output do @options.parse %w[--encoding invalid] end @@ -333,7 +333,7 @@ def test_parse_formatter_ri_site end def test_parse_h - out, = capture_io do + out, = capture_output do begin @options.parse %w[-h] rescue SystemExit @@ -345,7 +345,7 @@ def test_parse_h end def test_parse_help - out, = capture_io do + out, = capture_output do begin @options.parse %w[--help] rescue SystemExit @@ -365,7 +365,7 @@ def self.setup_options options end end - out, = capture_io do + out, = capture_output do begin @options.parse %w[--help] rescue SystemExit @@ -392,7 +392,7 @@ def self.setup_options options end def test_parse_ignore_invalid - out, err = capture_io do + out, err = capture_output do @options.parse %w[--ignore-invalid --bogus] end @@ -403,7 +403,7 @@ def test_parse_ignore_invalid end def test_parse_ignore_invalid_default - out, err = capture_io do + out, err = capture_output do @options.parse %w[--bogus --main BLAH] end @@ -416,7 +416,7 @@ def test_parse_ignore_invalid_default end def test_parse_ignore_invalid_no - out, err = capture_io do + out, err = capture_output do assert_raises SystemExit do @options.parse %w[--no-ignore-invalid --bogus=arg --bobogus --visibility=extended] end @@ -429,7 +429,7 @@ def test_parse_ignore_invalid_no end def test_parse_ignore_invalid_no_quiet - out, err = capture_io do + out, err = capture_output do assert_raises SystemExit do @options.parse %w[--quiet --no-ignore-invalid --bogus=arg --bobogus --visibility=extended] end @@ -442,7 +442,7 @@ def test_parse_ignore_invalid_no_quiet end def test_ignore_needless_arg - out, err = capture_io do + out, err = capture_output do @options.parse %w[--ri=foo] end @@ -452,7 +452,7 @@ def test_ignore_needless_arg end def test_ignore_missing_arg - out, err = capture_io do + out, err = capture_output do @options.parse %w[--copy-files] end @@ -462,7 +462,7 @@ def test_ignore_missing_arg end def test_parse_main - out, err = capture_io do + out, err = capture_output do @options.parse %w[--main MAIN] end @@ -473,7 +473,7 @@ def test_parse_main end def test_parse_markup - out, err = capture_io do + out, err = capture_output do @options.parse %w[--markup tomdoc] end @@ -486,7 +486,7 @@ def test_parse_markup def test_parse_page_dir assert_nil @options.page_dir - out, err = capture_io do + out, err = capture_output do @options.parse %W[--page-dir #{Dir.tmpdir}] end @@ -508,7 +508,7 @@ def test_parse_page_dir_root abs_page_dir = File.join dir, 'pages' FileUtils.mkdir abs_page_dir - out, err = capture_io do + out, err = capture_output do @options.parse %W[--page-dir #{abs_page_dir} --root #{abs_root}] end @@ -530,7 +530,7 @@ def test_parse_ri_site def test_parse_root assert_equal Pathname(Dir.pwd), @options.root - out, err = capture_io do + out, err = capture_output do @options.parse %W[--root #{Dir.tmpdir}] end @@ -548,13 +548,13 @@ def test_parse_tab_width @options.parse %w[-w2] assert_equal 2, @options.tab_width - _, err = capture_io do + _, err = capture_output do @options.parse %w[-w=2] end assert_match 'invalid options', err - _, err = capture_io do + _, err = capture_output do @options.parse %w[-w0] end @@ -562,7 +562,7 @@ def test_parse_tab_width end def test_parse_template - out, err = capture_io do + out, err = capture_output do @options.parse %w[--template darkfish] end @@ -575,7 +575,7 @@ def test_parse_template end def test_parse_template_nonexistent - out, err = capture_io do + out, err = capture_output do @options.parse %w[--template NONEXISTENT] end @@ -598,7 +598,7 @@ def test_parse_template_load_path FileUtils.mkdir_p template_dir - out, err = capture_io do + out, err = capture_output do @options.parse %w[--template load_path] end @@ -644,7 +644,7 @@ def test_parse_write_options end def test_parse_extension_alias - out, err = capture_io do + out, err = capture_output do @options.parse %w[--extension foobar=rdoc] end @@ -706,7 +706,7 @@ def test_update_output_dir end def test_warn - out, err = capture_io do + out, err = capture_output do @options.warn "warnings off" end @@ -715,7 +715,7 @@ def test_warn @options.verbosity = 2 - out, err = verbose_capture_io do + out, err = verbose_capture_output do @options.warn "warnings on" end @@ -734,7 +734,7 @@ def test_write_options end def test_version - out, _ = capture_io do + out, _ = capture_output do begin @options.parse %w[--version] rescue SystemExit @@ -743,7 +743,7 @@ def test_version assert out.include?(RDoc::VERSION) - out, _ = capture_io do + out, _ = capture_output do begin @options.parse %w[-v] rescue SystemExit diff --git a/test/rdoc/test_rdoc_parser.rb b/test/rdoc/test_rdoc_parser.rb index a2b5d957a7..57b8e01a87 100644 --- a/test/rdoc/test_rdoc_parser.rb +++ b/test/rdoc/test_rdoc_parser.rb @@ -47,7 +47,7 @@ def test_class_binary_japanese_text end def test_class_binary_large_japanese_rdoc - capture_io do + capture_output do begin extenc, Encoding.default_external = Encoding.default_external, Encoding::US_ASCII diff --git a/test/rdoc/test_rdoc_parser_c.rb b/test/rdoc/test_rdoc_parser_c.rb index 720c3730ab..81727ad759 100644 --- a/test/rdoc/test_rdoc_parser_c.rb +++ b/test/rdoc/test_rdoc_parser_c.rb @@ -337,7 +337,7 @@ def test_do_aliases_missing_class } EOF - _, err = verbose_capture_io do + _, err = verbose_capture_output do refute util_get_class(content, 'cDate') end @@ -657,7 +657,7 @@ def test_do_methods_in_c klass = nil - _, err = verbose_capture_io do + _, err = verbose_capture_output do klass = util_get_class content, 'cDate' end @@ -680,7 +680,7 @@ def test_do_methods_in_cpp klass = nil - _, err = verbose_capture_io do + _, err = verbose_capture_output do klass = util_get_class content, 'cDate' end @@ -703,7 +703,7 @@ def test_do_methods_in_y klass = nil - _, err = verbose_capture_io do + _, err = verbose_capture_output do klass = util_get_class content, 'cDate' end @@ -770,7 +770,7 @@ def test_do_missing_cycle parser.missing_dependencies['y'] = ['y', :class, 'Y', 'Object', 'z'] parser.missing_dependencies['z'] = ['z', :class, 'Z', 'Object', 'y'] - _, err = verbose_capture_io do + _, err = verbose_capture_output do parser.do_missing end diff --git a/test/rdoc/test_rdoc_parser_ruby.rb b/test/rdoc/test_rdoc_parser_ruby.rb index fde722a130..fe12958463 100644 --- a/test/rdoc/test_rdoc_parser_ruby.rb +++ b/test/rdoc/test_rdoc_parser_ruby.rb @@ -902,7 +902,7 @@ def test_parse_class_stopdoc def test_parse_class_lower_name_warning @options.verbosity = 2 - stds = capture_io do + stds = capture_output do util_parser "class foo\nend" tk = @parser.get_tk @parser.parse_class @top_level, RDoc::Parser::Ruby::NORMAL, tk, @comment @@ -913,7 +913,7 @@ def test_parse_class_lower_name_warning def test_parse_syntax_error_code @options.verbosity = 2 - stds = capture_io do + stds = capture_output do begin util_parser <hi', to_html('hi') end From f4cc4df22e6bff0bb445c3cc2738040943172fe1 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sun, 11 Aug 2019 12:35:54 +0900 Subject: [PATCH 2/7] Removed needless alias for capture_io. --- test/rdoc/helper.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/test/rdoc/helper.rb b/test/rdoc/helper.rb index 5589197b34..836b95e220 100644 --- a/test/rdoc/helper.rb +++ b/test/rdoc/helper.rb @@ -203,6 +203,5 @@ def verbose_capture_output end end - alias capture_io capture_output alias skip omit end From 347dd5fbb172f7d5f42936bcc3ee80507852f854 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sun, 11 Aug 2019 12:36:24 +0900 Subject: [PATCH 3/7] Removed CI status badge for Travis. --- README.rdoc | 1 - 1 file changed, 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index a0224acc85..59349dc6ae 100644 --- a/README.rdoc +++ b/README.rdoc @@ -3,7 +3,6 @@ home :: https://github.com/ruby/rdoc rdoc :: https://ruby.github.io/rdoc bugs :: https://github.com/ruby/rdoc/issues -build status :: {Build Status on Travis CI}[https://travis-ci.org/ruby/rdoc] {Build Status on AppVeyor}[https://ci.appveyor.com/project/ruby/rdoc] code quality :: {Code Climate}[https://codeclimate.com/github/ruby/rdoc] == Description From 6487555ddbfb4ef638de04e187441c2daa6cb5e8 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sun, 11 Aug 2019 12:37:05 +0900 Subject: [PATCH 4/7] Cleanup commented-out code. --- test/rdoc/helper.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/test/rdoc/helper.rb b/test/rdoc/helper.rb index 836b95e220..c2cbfdff67 100644 --- a/test/rdoc/helper.rb +++ b/test/rdoc/helper.rb @@ -7,7 +7,6 @@ end require 'test-unit' -# require 'minitest/benchmark' unless ENV['NOBENCHMARK'] require 'fileutils' require 'pp' From f48c3903b2b488585d8fb73eff58e475e51a14f1 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sun, 11 Aug 2019 12:39:11 +0900 Subject: [PATCH 5/7] Use test/unit instead of test-unit. Because test-unit is only provided standalone gem. --- lib/rdoc/markup/formatter_test_case.rb | 2 +- test/rdoc/helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rdoc/markup/formatter_test_case.rb b/lib/rdoc/markup/formatter_test_case.rb index d1e8923681..9f49dd0897 100644 --- a/lib/rdoc/markup/formatter_test_case.rb +++ b/lib/rdoc/markup/formatter_test_case.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require 'test-unit' +require 'test/unit' ## # Test case for creating new RDoc::Markup formatters. See diff --git a/test/rdoc/helper.rb b/test/rdoc/helper.rb index c2cbfdff67..de4cea5f4f 100644 --- a/test/rdoc/helper.rb +++ b/test/rdoc/helper.rb @@ -6,7 +6,7 @@ # for ruby tests end -require 'test-unit' +require 'test/unit' require 'fileutils' require 'pp' From 2ac92563f3ae2c755978e9ec05503a8253ddfc84 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sun, 11 Aug 2019 12:50:54 +0900 Subject: [PATCH 6/7] Use omit instead of skip for test-unit. --- test/rdoc/helper.rb | 2 -- test/rdoc/test_rdoc_generator_json_index.rb | 2 +- test/rdoc/test_rdoc_i18n_locale.rb | 2 +- test/rdoc/test_rdoc_options.rb | 4 ++-- test/rdoc/test_rdoc_parser.rb | 2 +- test/rdoc/test_rdoc_rdoc.rb | 6 +++--- test/rdoc/test_rdoc_ri_driver.rb | 8 ++++---- test/rdoc/test_rdoc_rubygems_hook.rb | 10 +++++----- test/rdoc/test_rdoc_servlet.rb | 4 ++-- 9 files changed, 19 insertions(+), 21 deletions(-) diff --git a/test/rdoc/helper.rb b/test/rdoc/helper.rb index de4cea5f4f..123d0ee274 100644 --- a/test/rdoc/helper.rb +++ b/test/rdoc/helper.rb @@ -201,6 +201,4 @@ def verbose_capture_output end end end - - alias skip omit end diff --git a/test/rdoc/test_rdoc_generator_json_index.rb b/test/rdoc/test_rdoc_generator_json_index.rb index 6a95acef73..66d15d1848 100644 --- a/test/rdoc/test_rdoc_generator_json_index.rb +++ b/test/rdoc/test_rdoc_generator_json_index.rb @@ -168,7 +168,7 @@ def test_generate_gzipped begin require 'zlib' rescue LoadError - skip "no zlib" + omit "no zlib" end @g.generate @g.generate_gzipped diff --git a/test/rdoc/test_rdoc_i18n_locale.rb b/test/rdoc/test_rdoc_i18n_locale.rb index 43fd7e2197..746d659c67 100644 --- a/test/rdoc/test_rdoc_i18n_locale.rb +++ b/test/rdoc/test_rdoc_i18n_locale.rb @@ -32,7 +32,7 @@ def test_load_existent_po begin require 'gettext/po_parser' rescue LoadError - skip 'gettext gem is not found' + omit 'gettext gem is not found' end fr_locale_dir = File.join @locale_dir, 'fr' diff --git a/test/rdoc/test_rdoc_options.rb b/test/rdoc/test_rdoc_options.rb index e3bbf034ff..ff47d7a9a1 100644 --- a/test/rdoc/test_rdoc_options.rb +++ b/test/rdoc/test_rdoc_options.rb @@ -17,8 +17,8 @@ def teardown end def test_check_files - skip "assumes UNIX permission model" if /mswin|mingw/ =~ RUBY_PLATFORM - skip "assumes that euid is not root" if Process.euid == 0 + omit "assumes UNIX permission model" if /mswin|mingw/ =~ RUBY_PLATFORM + omit "assumes that euid is not root" if Process.euid == 0 out, err = capture_output do temp_dir do diff --git a/test/rdoc/test_rdoc_parser.rb b/test/rdoc/test_rdoc_parser.rb index 57b8e01a87..7cc3c2d926 100644 --- a/test/rdoc/test_rdoc_parser.rb +++ b/test/rdoc/test_rdoc_parser.rb @@ -104,7 +104,7 @@ def test_class_for_executable end def test_class_for_forbidden - skip 'chmod not supported' if Gem.win_platform? + omit 'chmod not supported' if Gem.win_platform? tf = Tempfile.open 'forbidden' do |io| begin diff --git a/test/rdoc/test_rdoc_rdoc.rb b/test/rdoc/test_rdoc_rdoc.rb index aa74f65bc3..d7341191e7 100644 --- a/test/rdoc/test_rdoc_rdoc.rb +++ b/test/rdoc/test_rdoc_rdoc.rb @@ -163,7 +163,7 @@ def test_normalized_file_list_not_modified def test_normalized_file_list_non_file_directory dev = File::NULL - skip "#{dev} is not a character special" unless + omit "#{dev} is not a character special" unless File.chardev? dev files = nil @@ -349,8 +349,8 @@ def test_parse_file_encoding end def test_parse_file_forbidden - skip 'chmod not supported' if Gem.win_platform? - skip "assumes that euid is not root" if Process.euid == 0 + omit 'chmod not supported' if Gem.win_platform? + omit "assumes that euid is not root" if Process.euid == 0 @rdoc.store = RDoc::Store.new diff --git a/test/rdoc/test_rdoc_ri_driver.rb b/test/rdoc/test_rdoc_ri_driver.rb index 748ddaec31..9bb87b28d1 100644 --- a/test/rdoc/test_rdoc_ri_driver.rb +++ b/test/rdoc/test_rdoc_ri_driver.rb @@ -1029,7 +1029,7 @@ def test_find_store end def test_did_you_mean - skip 'skip test with did_you_men' unless defined? DidYouMean::SpellChecker + omit 'omit test with did_you_men' unless defined? DidYouMean::SpellChecker util_ancestors_store @@ -1227,7 +1227,7 @@ def _test_page # this test doesn't do anything anymore :( with_dummy_pager do @driver.page do |io| - skip "couldn't find a standard pager" if io == $stdout + omit "couldn't find a standard pager" if io == $stdout assert @driver.paging? end @@ -1239,7 +1239,7 @@ def _test_page # this test doesn't do anything anymore :( # this test is too fragile. Perhaps using Process.spawn will make this # reliable def _test_page_in_presence_of_child_status - skip 'this test hangs on travis-ci.org' if ENV['CI'] + omit 'this test hangs on travis-ci.org' if ENV['CI'] @driver.use_stdout = false with_dummy_pager do @@ -1407,7 +1407,7 @@ def _test_setup_pager # this test doesn't do anything anymore :( pager = with_dummy_pager do @driver.setup_pager end - skip "couldn't find a standard pager" unless pager + omit "couldn't find a standard pager" unless pager assert @driver.paging? ensure diff --git a/test/rdoc/test_rdoc_rubygems_hook.rb b/test/rdoc/test_rdoc_rubygems_hook.rb index a85bd291d6..af4a5fc0fa 100644 --- a/test/rdoc/test_rdoc_rubygems_hook.rb +++ b/test/rdoc/test_rdoc_rubygems_hook.rb @@ -22,7 +22,7 @@ def setup begin RDoc::RubygemsHook.load_rdoc rescue Gem::DocumentError => e - skip e.message + omit e.message end Gem.configuration[:rdoc] = nil @@ -200,8 +200,8 @@ def test_remove end def test_remove_unwritable - skip 'chmod not supported' if Gem.win_platform? - skip "assumes that euid is not root" if Process.euid == 0 + omit 'chmod not supported' if Gem.win_platform? + omit "assumes that euid is not root" if Process.euid == 0 FileUtils.mkdir_p @a.base_dir FileUtils.chmod 0, @a.base_dir @@ -230,8 +230,8 @@ def test_setup end def test_setup_unwritable - skip 'chmod not supported' if Gem.win_platform? - skip "assumes that euid is not root" if Process.euid == 0 + omit 'chmod not supported' if Gem.win_platform? + omit "assumes that euid is not root" if Process.euid == 0 FileUtils.mkdir_p @a.doc_dir FileUtils.chmod 0, @a.doc_dir diff --git a/test/rdoc/test_rdoc_servlet.rb b/test/rdoc/test_rdoc_servlet.rb index e91c57897a..e57926ecd3 100644 --- a/test/rdoc/test_rdoc_servlet.rb +++ b/test/rdoc/test_rdoc_servlet.rb @@ -294,7 +294,7 @@ def test_generator_for end def test_if_modified_since - skip 'File.utime on directory not supported' if Gem.win_platform? + omit 'File.utime on directory not supported' if Gem.win_platform? temp_dir do now = Time.now @@ -307,7 +307,7 @@ def test_if_modified_since end def test_if_modified_since_not_modified - skip 'File.utime on directory not supported' if Gem.win_platform? + omit 'File.utime on directory not supported' if Gem.win_platform? temp_dir do now = Time.now From ea1398a16ddce01b65529c37c7182d1d46225937 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sun, 11 Aug 2019 12:53:49 +0900 Subject: [PATCH 7/7] Gem::TestCase is based on Minitest --- test/rdoc/test_rdoc_rubygems_hook.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/rdoc/test_rdoc_rubygems_hook.rb b/test/rdoc/test_rdoc_rubygems_hook.rb index af4a5fc0fa..a85bd291d6 100644 --- a/test/rdoc/test_rdoc_rubygems_hook.rb +++ b/test/rdoc/test_rdoc_rubygems_hook.rb @@ -22,7 +22,7 @@ def setup begin RDoc::RubygemsHook.load_rdoc rescue Gem::DocumentError => e - omit e.message + skip e.message end Gem.configuration[:rdoc] = nil @@ -200,8 +200,8 @@ def test_remove end def test_remove_unwritable - omit 'chmod not supported' if Gem.win_platform? - omit "assumes that euid is not root" if Process.euid == 0 + skip 'chmod not supported' if Gem.win_platform? + skip "assumes that euid is not root" if Process.euid == 0 FileUtils.mkdir_p @a.base_dir FileUtils.chmod 0, @a.base_dir @@ -230,8 +230,8 @@ def test_setup end def test_setup_unwritable - omit 'chmod not supported' if Gem.win_platform? - omit "assumes that euid is not root" if Process.euid == 0 + skip 'chmod not supported' if Gem.win_platform? + skip "assumes that euid is not root" if Process.euid == 0 FileUtils.mkdir_p @a.doc_dir FileUtils.chmod 0, @a.doc_dir