Skip to content

Commit 439e0fc

Browse files
committed
When rubygems_plugin.rb is not found, test_rdoc_rubygems_hook.rb is skipped.
1 parent 1a65331 commit 439e0fc

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/ruby-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ jobs:
5555
ruby tool/sync_default_gems.rb rdoc
5656
working-directory: ruby/ruby
5757
- name: Test RDoc
58-
run: make -j2 -s test-all TESTS="rdoc --no-retry --exclude test_rdoc_rubygems_hook.rb"
58+
run: make -j2 -s test-all TESTS="rdoc --no-retry"
5959
working-directory: ruby/ruby

test/rdoc/test_rdoc_rubygems_hook.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
require 'rubygems'
33
require 'fileutils'
44
require 'tmpdir'
5-
require_relative '../../lib/rubygems_plugin'
65
require 'test/unit'
76

7+
begin
8+
require_relative '../../lib/rubygems_plugin'
9+
rescue LoadError
10+
end
11+
812
class TestRDocRubyGemsHook < Test::Unit::TestCase
913
def setup
1014
@a = Gem::Specification.new do |s|
@@ -284,4 +288,4 @@ def test_setup_unwritable
284288
end
285289
end
286290

287-
end
291+
end if defined?(RDoc::RubyGemsHook)

0 commit comments

Comments
 (0)