Skip RDoc related feature if Gem::RDoc is not available
This commit is contained in:
parent
185602e696
commit
4aa3491bd2
Notes:
git
2024-09-01 11:00:32 +00:00
@ -336,6 +336,8 @@ By default, this RubyGems will install gem as:
|
||||
|
||||
require_relative "../rdoc"
|
||||
|
||||
return false unless defined?(Gem::RDoc)
|
||||
|
||||
fake_spec = Gem::Specification.new "rubygems", Gem::VERSION
|
||||
def fake_spec.full_gem_path
|
||||
File.expand_path "../../..", __dir__
|
||||
|
@ -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|
|
||||
|
@ -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|
|
||||
|
@ -134,4 +134,4 @@ class TestGemRDoc < Gem::TestCase
|
||||
FileUtils.rm_r @a.doc_dir
|
||||
end
|
||||
end
|
||||
end
|
||||
end if defined?(Gem::RDoc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user