Skip to content

Commit 07c9190

Browse files
committed
Use test-unit instead of minitest
Minitest 6 will err `assert_equal` with `nil`. minitest/minitest#779
1 parent b94edb0 commit 07c9190

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

lib/rdoc/markup/formatter_test_case.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
2-
require 'minitest/unit'
2+
require 'test-unit'
33

44
##
55
# Test case for creating new RDoc::Markup formatters. See

test/minitest_helper.rb

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# frozen_string_literal: true
22
begin
3-
gem 'minitest', '~> 5.0'
3+
gem 'test-unit'
44
rescue NoMethodError, Gem::LoadError
55
# for ruby tests
66
end
77

8-
require 'minitest/autorun'
9-
require 'minitest/benchmark' unless ENV['NOBENCHMARK']
8+
require 'test-unit'
9+
# require 'minitest/benchmark' unless ENV['NOBENCHMARK']
1010

1111
require 'fileutils'
1212
require 'pp'
@@ -29,7 +29,7 @@
2929
# * <code>@pwd</code> containing the current working directory
3030
# * FileUtils, pp, Tempfile, Dir.tmpdir and StringIO
3131

32-
class RDoc::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Unit::TestCase)
32+
class RDoc::TestCase < Test::Unit::TestCase
3333

3434
##
3535
# Abstract test-case setup
@@ -190,7 +190,7 @@ def verb *parts
190190
# run capture_io with setting $VERBOSE = true
191191

192192
def verbose_capture_io
193-
capture_io do
193+
capture_output do
194194
begin
195195
orig_verbose = $VERBOSE
196196
$VERBOSE = true
@@ -200,4 +200,7 @@ def verbose_capture_io
200200
end
201201
end
202202
end
203+
204+
alias capture_io capture_output
205+
alias skip omit
203206
end

0 commit comments

Comments
 (0)