Skip to content

Commit

Permalink
When rubygems_plugin.rb is not found, test_rdoc_rubygems_hook.rb
Browse files Browse the repository at this point in the history
…is skipped.
  • Loading branch information
mterada1228 committed Sep 8, 2024
1 parent 1a65331 commit 439e0fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruby-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ jobs:
ruby tool/sync_default_gems.rb rdoc
working-directory: ruby/ruby
- name: Test RDoc
run: make -j2 -s test-all TESTS="rdoc --no-retry --exclude test_rdoc_rubygems_hook.rb"
run: make -j2 -s test-all TESTS="rdoc --no-retry"
working-directory: ruby/ruby
8 changes: 6 additions & 2 deletions test/rdoc/test_rdoc_rubygems_hook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
require 'rubygems'
require 'fileutils'
require 'tmpdir'
require_relative '../../lib/rubygems_plugin'
require 'test/unit'

begin
require_relative '../../lib/rubygems_plugin'
rescue LoadError
end

class TestRDocRubyGemsHook < Test::Unit::TestCase
def setup
@a = Gem::Specification.new do |s|
Expand Down Expand Up @@ -284,4 +288,4 @@ def test_setup_unwritable
end
end

end
end if defined?(RDoc::RubyGemsHook)

0 comments on commit 439e0fc

Please sign in to comment.