mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use test-unit instead of minitest
Minitest 6 will err `assert_equal` with `nil`. https://github.com/seattlerb/minitest/issues/779
This commit is contained in:
parent
64f9f512c5
commit
1a5304228a
2 changed files with 8 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
require 'minitest/unit'
|
require 'test-unit'
|
||||||
|
|
||||||
##
|
##
|
||||||
# Test case for creating new RDoc::Markup formatters. See
|
# Test case for creating new RDoc::Markup formatters. See
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
require 'bundler/errors'
|
require 'bundler/errors'
|
||||||
begin
|
begin
|
||||||
gem 'minitest', '~> 5.0'
|
gem 'test-unit'
|
||||||
rescue NoMethodError, Gem::LoadError, Bundler::GemfileNotFound
|
rescue NoMethodError, Gem::LoadError, Bundler::GemfileNotFound
|
||||||
# for ruby tests
|
# for ruby tests
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'minitest/autorun'
|
require 'test-unit'
|
||||||
require 'minitest/benchmark' unless ENV['NOBENCHMARK']
|
# require 'minitest/benchmark' unless ENV['NOBENCHMARK']
|
||||||
|
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
require 'pp'
|
require 'pp'
|
||||||
|
@ -30,7 +30,7 @@ require 'rdoc'
|
||||||
# * <code>@pwd</code> containing the current working directory
|
# * <code>@pwd</code> containing the current working directory
|
||||||
# * FileUtils, pp, Tempfile, Dir.tmpdir and StringIO
|
# * FileUtils, pp, Tempfile, Dir.tmpdir and StringIO
|
||||||
|
|
||||||
class RDoc::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Unit::TestCase)
|
class RDoc::TestCase < Test::Unit::TestCase
|
||||||
|
|
||||||
##
|
##
|
||||||
# Abstract test-case setup
|
# Abstract test-case setup
|
||||||
|
@ -202,4 +202,7 @@ class RDoc::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Un
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
alias capture_io capture_output
|
||||||
|
alias skip omit
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue