Skip show_doc tests if RDoc is not available

This commit is contained in:
Hiroshi SHIBATA 2024-08-29 17:41:16 +09:00
parent 4aa3491bd2
commit eb144ef91e
Notes: git 2024-09-01 11:00:32 +00:00
2 changed files with 6 additions and 3 deletions

View File

@ -765,7 +765,7 @@ module TestIRB
ensure
# this is the only way to reset the redefined method without coupling the test with its implementation
EnvUtil.suppress_warning { load "irb/command/help.rb" }
end
end if defined?(RDoc)
def test_show_doc_without_rdoc
_, err = without_rdoc do

View File

@ -1,7 +1,10 @@
# frozen_string_literal: false
require "irb"
require "rdoc"
begin
require "rdoc"
rescue LoadError
end
require_relative "helper"
module TestIRB
@ -188,4 +191,4 @@ module TestIRB
File.exist?(RDoc::RI::Paths::BASE)
end
end
end
end if defined?(RDoc)