summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2024-08-29 17:38:59 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2024-09-01 20:00:13 +0900
commit4aa3491bd235fd16fbef7ba24181bc838aa29abb (patch)
treec441293e6e207730f0def10b86ad19623183b99a /test
parent185602e696980ba776465842fc0398eba2acb677 (diff)
Skip RDoc related feature if Gem::RDoc is not available
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11491
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
-rw-r--r--test/rubygems/test_gem_rdoc.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb
index 5b09512ac4..1bd96600f3 100644
--- a/test/rubygems/test_gem_commands_install_command.rb
+++ b/test/rubygems/test_gem_commands_install_command.rb
@@ -667,7 +667,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
+ end if defined?(Gem::RDoc)
def test_execute_rdoc_with_path
specs = spec_fetcher do |fetcher|
@@ -703,7 +703,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
+ end if defined?(Gem::RDoc)
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 194ebb030a..642a62a373 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
+ end if defined?(Gem::RDoc)
def test_execute_named
spec_fetcher do |fetcher|
diff --git a/test/rubygems/test_gem_rdoc.rb b/test/rubygems/test_gem_rdoc.rb
index f9b1df6cd5..19ccf1e587 100644
--- a/test/rubygems/test_gem_rdoc.rb
+++ b/test/rubygems/test_gem_rdoc.rb
@@ -134,4 +134,4 @@ class TestGemRDoc < Gem::TestCase
FileUtils.rm_r @a.doc_dir
end
end
-end
+end if defined?(Gem::RDoc)