Skip to content

Commit

Permalink
Skip show_doc tests if RDoc is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Aug 29, 2024
1 parent 40860d2 commit f6dd310
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/irb/test_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ def test_show_doc
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
Expand Down
7 changes: 5 additions & 2 deletions test/irb/test_input_method.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# frozen_string_literal: false

require "irb"
require "rdoc"
begin
require "rdoc"
rescue LoadError
end
require_relative "helper"

module TestIRB
Expand Down Expand Up @@ -188,4 +191,4 @@ def has_rdoc_content?
File.exist?(RDoc::RI::Paths::BASE)
end
end
end
end if defined?(RDoc)

0 comments on commit f6dd310

Please sign in to comment.