Fixed broken runner for make test-all
This commit is contained in:
parent
871e7b5f55
commit
3e32412e08
Notes:
git
2021-09-11 08:48:42 +09:00
@ -205,7 +205,7 @@ module MiniTest
|
||||
end
|
||||
|
||||
def _run_anything type
|
||||
suites = TestCase.send "#{type}_suites"
|
||||
suites = Test::Unit::TestCase.send "#{type}_suites"
|
||||
return if suites.empty?
|
||||
|
||||
puts
|
||||
|
@ -71,7 +71,7 @@ module Test
|
||||
srand(seed)
|
||||
orig_args.unshift "--seed=#{seed}"
|
||||
end
|
||||
MiniTest::Unit::TestCase.test_order = order if order
|
||||
Test::Unit::TestCase.test_order = order if order
|
||||
|
||||
@help = "\n" + orig_args.map { |s|
|
||||
" " + (s =~ /[\s|&<>$()]/ ? s.inspect : s)
|
||||
@ -517,7 +517,7 @@ module Test
|
||||
require 'timeout'
|
||||
@tasks = @files.dup # Array of filenames.
|
||||
|
||||
case MiniTest::Unit::TestCase.test_order
|
||||
case Test::Unit::TestCase.test_order
|
||||
when :random
|
||||
@tasks.shuffle!
|
||||
else
|
||||
@ -1008,7 +1008,7 @@ module Test
|
||||
|
||||
def non_options(files, options)
|
||||
if options.delete(:gc_stress)
|
||||
MiniTest::Unit::TestCase.class_eval do
|
||||
Test::Unit::TestCase.class_eval do
|
||||
oldrun = instance_method(:run)
|
||||
define_method(:run) do |runner|
|
||||
begin
|
||||
@ -1021,7 +1021,7 @@ module Test
|
||||
end
|
||||
end
|
||||
if options.delete(:gc_compact)
|
||||
MiniTest::Unit::TestCase.class_eval do
|
||||
Test::Unit::TestCase.class_eval do
|
||||
oldrun = instance_method(:run)
|
||||
define_method(:run) do |runner|
|
||||
begin
|
||||
|
@ -3,8 +3,6 @@ require 'test/unit/assertions'
|
||||
|
||||
module Test
|
||||
module Unit
|
||||
# remove silly TestCase class
|
||||
remove_const(:TestCase) if defined?(self::TestCase)
|
||||
|
||||
##
|
||||
# Provides a simple set of guards that you can use in your tests
|
||||
@ -163,6 +161,8 @@ module Test
|
||||
# Runs the tests reporting the status to +runner+
|
||||
|
||||
def run runner
|
||||
@options = runner.options
|
||||
|
||||
trap "INFO" do
|
||||
runner.report.each_with_index do |msg, i|
|
||||
warn "\n%3d) %s" % [i + 1, msg]
|
||||
@ -191,7 +191,7 @@ module Test
|
||||
rescue *PASSTHROUGH_EXCEPTIONS
|
||||
raise
|
||||
rescue Exception => e
|
||||
@passed = Skip === e
|
||||
@passed = MiniTest::Skip === e
|
||||
time = Time.now - start_time
|
||||
runner.record self.class, self.__name__, self._assertions, time, e
|
||||
result = runner.puke self.class, self.__name__, e
|
||||
@ -337,11 +337,6 @@ module Test
|
||||
false
|
||||
end
|
||||
|
||||
def run runner
|
||||
@options = runner.options
|
||||
super runner
|
||||
end
|
||||
|
||||
def self.method_added(name)
|
||||
super
|
||||
return unless name.to_s.start_with?("test_")
|
||||
|
Loading…
x
Reference in New Issue
Block a user