summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2025-01-15 12:36:50 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2025-01-15 16:52:56 +0900
commit2bfa49f28866f3d4dfecd04984ad180aff82bb7d (patch)
treefcb4ffd9ea5d3ee110c55ea409b2d6d66da23dd7 /test
parentc6923278d81f6bac9a654d554ab1d581fd7ef372 (diff)
Skip related tests with Gem::RDoc
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12577
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_commands_install_command.rb4
-rw-r--r--test/rubygems/test_gem_commands_update_command.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb
index c7fbca196b..4e49f52b4c 100644
--- a/test/rubygems/test_gem_commands_install_command.rb
+++ b/test/rubygems/test_gem_commands_install_command.rb
@@ -665,7 +665,7 @@ ERROR: Possible alternatives: non_existent_with_hint
assert_path_exist File.join(a2.doc_dir, "ri")
assert_path_exist File.join(a2.doc_dir, "rdoc")
- end unless Gem.rdoc_hooks_defined_via_plugin?
+ end if defined?(Gem::RDoc) && !Gem.rdoc_hooks_defined_via_plugin?
def test_execute_rdoc_with_path
specs = spec_fetcher do |fetcher|
@@ -701,7 +701,7 @@ ERROR: Possible alternatives: non_existent_with_hint
wait_for_child_process_to_exit
assert_path_exist "whatever/doc/a-2", "documentation not installed"
- end unless Gem.rdoc_hooks_defined_via_plugin?
+ end if defined?(Gem::RDoc) && !Gem.rdoc_hooks_defined_via_plugin?
def test_execute_saves_build_args
specs = spec_fetcher do |fetcher|
diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb
index 24e24f97f6..3b106e4581 100644
--- a/test/rubygems/test_gem_commands_update_command.rb
+++ b/test/rubygems/test_gem_commands_update_command.rb
@@ -506,7 +506,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
a2 = @specs["a-2"]
assert_path_exist File.join(a2.doc_dir, "rdoc")
- end unless Gem.rdoc_hooks_defined_via_plugin?
+ end if defined?(Gem::RDoc) && !Gem.rdoc_hooks_defined_via_plugin?
def test_execute_named
spec_fetcher do |fetcher|