summaryrefslogtreecommitdiff
path: root/tool/lib/test/unit/testcase.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-09-07 11:46:12 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-09-11 08:48:03 +0900
commit3e32412e08d2ec77cb84d535b591445cdaa4656a (patch)
tree637e70b33d9b3f121dfc3f83f9bbc0c7ee356300 /tool/lib/test/unit/testcase.rb
parent871e7b5f55f079e04fdc3f6f42eaa139e3a3345a (diff)
Fixed broken runner for `make test-all`
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4813
Diffstat (limited to 'tool/lib/test/unit/testcase.rb')
-rw-r--r--tool/lib/test/unit/testcase.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/tool/lib/test/unit/testcase.rb b/tool/lib/test/unit/testcase.rb
index b913621fc3..cbcfb4358c 100644
--- a/tool/lib/test/unit/testcase.rb
+++ b/tool/lib/test/unit/testcase.rb
@@ -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_")