minitest 5.26.2 → 6.0.0.a1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/History.rdoc +80 -0
  4. data/Manifest.txt +13 -4
  5. data/README.rdoc +8 -90
  6. data/Rakefile +7 -1
  7. data/bin/minitest +5 -0
  8. data/lib/minitest/assertions.rb +32 -64
  9. data/lib/minitest/autorun.rb +3 -4
  10. data/lib/minitest/benchmark.rb +2 -2
  11. data/lib/minitest/bisect.rb +306 -0
  12. data/lib/minitest/complete.rb +56 -0
  13. data/lib/minitest/find_minimal_combination.rb +127 -0
  14. data/lib/minitest/hell.rb +1 -1
  15. data/lib/minitest/manual_plugins.rb +4 -16
  16. data/lib/minitest/parallel.rb +3 -3
  17. data/lib/minitest/path_expander.rb +418 -0
  18. data/lib/minitest/pride.rb +2 -2
  19. data/lib/minitest/pride_plugin.rb +1 -1
  20. data/lib/minitest/server.rb +45 -0
  21. data/lib/minitest/server_plugin.rb +84 -0
  22. data/lib/minitest/spec.rb +4 -33
  23. data/lib/minitest/sprint.rb +104 -0
  24. data/lib/minitest/sprint_plugin.rb +39 -0
  25. data/lib/minitest/test.rb +8 -13
  26. data/lib/minitest/test_task.rb +6 -13
  27. data/lib/minitest.rb +62 -91
  28. data/test/minitest/metametameta.rb +1 -1
  29. data/test/minitest/test_bisect.rb +235 -0
  30. data/test/minitest/test_find_minimal_combination.rb +138 -0
  31. data/test/minitest/test_minitest_assertions.rb +41 -101
  32. data/test/minitest/test_minitest_reporter.rb +6 -5
  33. data/test/minitest/test_minitest_spec.rb +41 -117
  34. data/test/minitest/test_minitest_test.rb +21 -100
  35. data/test/minitest/test_path_expander.rb +229 -0
  36. data/test/minitest/test_server.rb +149 -0
  37. data.tar.gz.sig +0 -0
  38. metadata +50 -14
  39. metadata.gz.sig +0 -0
  40. data/.autotest +0 -34
  41. data/lib/minitest/mock.rb +0 -327
  42. data/lib/minitest/unit.rb +0 -42
  43. data/test/minitest/test_minitest_mock.rb +0 -1213
@@ -0,0 +1,104 @@
1
+ $LOAD_PATH.unshift "test", "lib"
2
+
3
+ require "simplecov" if ENV["MT_COV"] || ARGV.delete("--simplecov")
4
+ require_relative "autorun"
5
+ require_relative "path_expander"
6
+
7
+ ##
8
+ # Runs (Get it? It's fast!) your tests and makes it easier to rerun individual
9
+ # failures.
10
+
11
+ module Minitest
12
+ class Sprint
13
+ # extracted version = "1.5.0"
14
+
15
+ ##
16
+ # Process and run minitest cmdline.
17
+
18
+ def self.run args = ARGV
19
+ if ARGV.delete("--bisect") or ARGV.delete("-b") then
20
+ require_relative "bisect"
21
+
22
+ return Minitest::Bisect.run ARGV
23
+ end
24
+
25
+ Minitest::PathExpander.new(args).process { |f|
26
+ require "./#{f}" if File.file? f
27
+ }
28
+ end
29
+
30
+ ##
31
+ # An extra minitest reporter to output how to rerun failures in
32
+ # various styles.
33
+
34
+ class SprintReporter < AbstractReporter
35
+ ##
36
+ # The style to report, either lines or regexp. Defaults to lines.
37
+ attr_accessor :style
38
+ attr_accessor :results # :nodoc:
39
+
40
+ def initialize style = :regexp # :nodoc:
41
+ self.results = []
42
+ self.style = style
43
+ end
44
+
45
+ def record result # :nodoc:
46
+ results << result unless result.passed? or result.skipped?
47
+ end
48
+
49
+ def report # :nodoc:
50
+ return if results.empty?
51
+
52
+ puts
53
+ puts "Happy Happy Sprint List:"
54
+ puts
55
+ print_list
56
+ puts
57
+ end
58
+
59
+ def print_list # :nodoc:
60
+ case style
61
+ when :regexp
62
+ results.each do |result|
63
+ puts " minitest -n #{result.class_name}##{result.name}"
64
+ end
65
+ when :lines
66
+ files = Hash.new { |h,k| h[k] = [] }
67
+ results.each do |result|
68
+ path, line = result.source_location
69
+ path = path.delete_prefix "#{Dir.pwd}/"
70
+ files[path] << line
71
+ end
72
+
73
+ files.sort.each do |path, lines|
74
+ puts " minitest %s:%s" % [path, lines.sort.join(",")]
75
+ end
76
+ else
77
+ raise "unsupported style: %p" % [style]
78
+ end
79
+ end
80
+ end
81
+
82
+ ##
83
+ # An extra minitest reporter to output how to rerun failures using
84
+ # rake.
85
+
86
+ class RakeReporter < SprintReporter
87
+ ##
88
+ # The name of the rake task to rerun. Defaults to nil.
89
+
90
+ attr_accessor :name
91
+
92
+ def initialize name = nil # :nodoc:
93
+ super()
94
+ self.name = name
95
+ end
96
+
97
+ def print_list # :nodoc:
98
+ results.each do |result|
99
+ puts [" rake", name, "N=#{result.class_name}##{result.name}"].compact.join(" ")
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,39 @@
1
+ require_relative "../minitest"
2
+
3
+ # :stopdoc:
4
+ class OptionParser # unofficial embedded gem "makeoptparseworkwell"
5
+ def hidden(...) = define(...).tap { |sw| def sw.summarize(*) = nil }
6
+ def deprecate(from, to) = hidden(from) { abort "#{from} is deprecated. Use #{to}." }
7
+ def topdict(name) = name.length > 1 ? top.long : top.short
8
+ def alias(from, to) = (dict = topdict(from) and dict[to] = dict[from])
9
+ end unless OptionParser.method_defined? :hidden
10
+ # :startdoc:
11
+
12
+ module Minitest # :nodoc:
13
+ def self.plugin_sprint_options opts, options # :nodoc:
14
+ opts.on "--rake [TASK]", "Report how to re-run failures with rake." do |task|
15
+ options[:sprint] = :rake
16
+ options[:rake_task] = task
17
+ end
18
+
19
+ opts.deprecate "--binstub", "--rerun"
20
+
21
+ sprint_styles = %w[rake lines names binstub]
22
+
23
+ opts.on "-r", "--rerun [STYLE]", sprint_styles, "Report how to re-run failures using STYLE (names, lines)." do |style|
24
+ options[:sprint] = (style || :lines).to_sym
25
+ end
26
+ end
27
+
28
+ def self.plugin_sprint_init options
29
+ require_relative "sprint"
30
+ case options[:sprint]
31
+ when :rake then
32
+ self.reporter << Minitest::Sprint::RakeReporter.new(options[:rake_task])
33
+ when :binstub, :names then
34
+ self.reporter << Minitest::Sprint::SprintReporter.new
35
+ when :lines then
36
+ self.reporter << Minitest::Sprint::SprintReporter.new(:lines)
37
+ end
38
+ end
39
+ end
data/lib/minitest/test.rb CHANGED
@@ -1,4 +1,5 @@
1
- require "minitest" unless defined? Minitest::Runnable
1
+ raise "what the fuck?" unless defined? Minitest::Runnable
2
+ require_relative "../minitest" unless defined? Minitest::Runnable
2
3
 
3
4
  module Minitest
4
5
  ##
@@ -8,14 +9,10 @@ module Minitest
8
9
  # See Minitest::Assertions
9
10
 
10
11
  class Test < Runnable
11
- require "minitest/assertions"
12
+ require_relative "assertions"
12
13
  include Minitest::Reportable
13
14
  include Minitest::Assertions
14
15
 
15
- def class_name # :nodoc:
16
- self.class.name # for Minitest::Reportable
17
- end
18
-
19
16
  PASSTHROUGH_EXCEPTIONS = [NoMemoryError, SignalException, SystemExit] # :nodoc:
20
17
 
21
18
  SETUP_METHODS = %w[ before_setup setup after_setup ] # :nodoc:
@@ -34,8 +31,8 @@ module Minitest
34
31
 
35
32
  def self.i_suck_and_my_tests_are_order_dependent!
36
33
  class << self
37
- undef_method :test_order if method_defined? :test_order
38
- define_method :test_order do :alpha end
34
+ undef_method :run_order if method_defined? :run_order
35
+ define_method :run_order do :alpha end
39
36
  end
40
37
  end
41
38
 
@@ -65,20 +62,20 @@ module Minitest
65
62
 
66
63
  ##
67
64
  # Returns all instance methods starting with "test_". Based on
68
- # #test_order, the methods are either sorted, randomized
65
+ # #run_order, the methods are either sorted, randomized
69
66
  # (default), or run in parallel.
70
67
 
71
68
  def self.runnable_methods
72
69
  methods = methods_matching(/^test_/)
73
70
 
74
- case self.test_order
71
+ case self.run_order
75
72
  when :random, :parallel then
76
73
  srand Minitest.seed
77
74
  methods.sort.shuffle
78
75
  when :alpha, :sorted then
79
76
  methods.sort
80
77
  else
81
- raise "Unknown test_order: #{self.test_order.inspect}"
78
+ raise "Unknown_order: %p" % [self.run_order]
82
79
  end
83
80
  end
84
81
 
@@ -234,5 +231,3 @@ module Minitest
234
231
  extend Guard
235
232
  end # Test
236
233
  end
237
-
238
- require "minitest/unit" if ENV["MT_COMPAT"] # compatibility layer only
@@ -168,20 +168,18 @@ module Minitest # :nodoc:
168
168
  ENV["TESTOPTS"]
169
169
  warn "FILTER is deprecated in Minitest::TestTask. Use A instead" if
170
170
  ENV["FILTER"]
171
- warn "N is deprecated in Minitest::TestTask. Use MT_CPU instead" if
172
- ENV["N"] && ENV["N"].to_i > 0
173
171
 
174
172
  lib_extras = (ENV["MT_LIB_EXTRAS"] || "").split File::PATH_SEPARATOR
175
173
  self.libs[0, 0] = lib_extras
176
174
 
177
- extra_args << "-n" << ENV["N"] if ENV["N"]
178
- extra_args << "-e" << ENV["X"] if ENV["X"]
175
+ extra_args << "-i" << ENV["N"] if ENV["N"]
176
+ extra_args << "-i" << ENV["I"] if ENV["I"]
177
+ extra_args << "-x" << ENV["X"] if ENV["X"]
178
+ extra_args << "-x" << ENV["E"] if ENV["E"]
179
179
  extra_args.concat Shellwords.split(ENV["TESTOPTS"]) if ENV["TESTOPTS"]
180
180
  extra_args.concat Shellwords.split(ENV["FILTER"]) if ENV["FILTER"]
181
181
  extra_args.concat Shellwords.split(ENV["A"]) if ENV["A"]
182
182
 
183
- ENV.delete "N" if ENV["N"]
184
-
185
183
  # TODO? RUBY_DEBUG = ENV["RUBY_DEBUG"]
186
184
  # TODO? ENV["RUBY_FLAGS"]
187
185
 
@@ -303,13 +301,8 @@ module Minitest # :nodoc:
303
301
  end
304
302
 
305
303
  class Work < Queue # :nodoc:
306
- def initialize jobs = [] # :nodoc:
307
- super()
308
-
309
- jobs.each do |job|
310
- self << job
311
- end
312
-
304
+ def initialize jobs # :nodoc:
305
+ super
313
306
  close
314
307
  end
315
308
  end
data/lib/minitest.rb CHANGED
@@ -10,7 +10,7 @@ require_relative "minitest/compress"
10
10
  # runtime. See +Minitest.run+ for more information.
11
11
 
12
12
  module Minitest
13
- VERSION = "5.26.2" # :nodoc:
13
+ VERSION = "6.0.0.a1" # :nodoc:
14
14
 
15
15
  @@installed_at_exit ||= false
16
16
  @@after_run = []
@@ -33,8 +33,7 @@ module Minitest
33
33
 
34
34
  cattr_accessor :parallel_executor
35
35
 
36
- warn "DEPRECATED: use MT_CPU instead of N for parallel test runs" if ENV["N"] && ENV["N"].to_i > 0
37
- n_threads = (ENV["MT_CPU"] || ENV["N"] || Etc.nprocessors).to_i
36
+ n_threads = (ENV["MT_CPU"] || Etc.nprocessors).to_i
38
37
 
39
38
  self.parallel_executor = Parallel::Executor.new n_threads if n_threads > 1
40
39
 
@@ -68,8 +67,7 @@ module Minitest
68
67
  # Registers Minitest to run at process exit
69
68
 
70
69
  def self.autorun
71
- Warning[:deprecated] = true if
72
- Object.const_defined?(:Warning) && Warning.respond_to?(:[]=)
70
+ Warning[:deprecated] = true
73
71
 
74
72
  at_exit {
75
73
  next if $! and not ($!.kind_of? SystemExit and $!.success?)
@@ -98,6 +96,17 @@ module Minitest
98
96
  @@after_run << block
99
97
  end
100
98
 
99
+ ##
100
+ # Manually load plugins by name.
101
+
102
+ def self.load *names
103
+ names.each do |name|
104
+ require "minitest/#{name}_plugin"
105
+
106
+ self.extensions << name.to_s
107
+ end
108
+ end
109
+
101
110
  ##
102
111
  # Register a plugin to be used. Does NOT require / load it.
103
112
 
@@ -146,6 +155,8 @@ module Minitest
146
155
  }
147
156
  orig_args = args.dup
148
157
 
158
+ warn "--no-plugins is a no-op" if args.delete "--no-plugins" # TODO: remove me! when?
159
+
149
160
  OptionParser.new do |opts|
150
161
  opts.program_name = "minitest"
151
162
  opts.version = Minitest::VERSION
@@ -161,8 +172,6 @@ module Minitest
161
172
  exit
162
173
  end
163
174
 
164
- opts.on "--no-plugins", "Bypass minitest plugin auto-loading (or env: MT_NO_PLUGINS=1)."
165
-
166
175
  desc = "Sets random seed. Also via env, eg: SEED=42"
167
176
  opts.on "-s", "--seed SEED", Integer, desc do |m|
168
177
  options[:seed] = m
@@ -180,22 +189,24 @@ module Minitest
180
189
  options[:show_skips] = true
181
190
  end
182
191
 
183
- opts.on "-n", "--name PATTERN", "Include /regexp/ or string for run." do |a|
184
- options[:filter] = a
192
+ opts.on "-b", "--bisect", "Run minitest in bisect-mode to isolate flaky tests."
193
+
194
+ opts.on "-i", "--include PATTERN", "Include /regexp/ or string for run." do |a|
195
+ options[:include] = a
185
196
  end
186
197
 
187
198
  opts.on "-e", "--exclude PATTERN", "Exclude /regexp/ or string from run." do |a|
188
199
  options[:exclude] = a
189
200
  end
190
201
 
191
- # omg wtf
192
- def opts.short_alias(from, to) = top.short[to] = top.short[from]
193
- def opts.long_alias(from, to) = top.long[to] = top.long[from]
202
+ # part of my unofficial embedded gem "makeoptparseworkwell"
203
+ def opts.topdict(name) = (name.length > 1 ? top.long : top.short)
204
+ def opts.alias(from, to) = (dict = topdict(from) ; dict[to] = dict[from])
194
205
 
195
206
  # these will work but won't show up in --help output:
196
- opts.long_alias "name", "include"
197
- opts.short_alias "n", "i"
198
- opts.short_alias "e", "x"
207
+ opts.alias "include", "name"
208
+ opts.alias "i", "n"
209
+ opts.alias "e", "x"
199
210
 
200
211
  opts.on "-S", "--skip CODES", String, "Skip reporting of certain types of results (eg E)." do |s|
201
212
  options[:skip] = s.chars.to_a
@@ -205,7 +216,7 @@ module Minitest
205
216
  options[:Werror] = true
206
217
  case s
207
218
  when "error", "all", nil then
208
- require "minitest/error_on_warning"
219
+ require_relative "minitest/error_on_warning"
209
220
  $VERBOSE = true
210
221
  ::Warning[:deprecated] = true
211
222
  else
@@ -266,23 +277,20 @@ module Minitest
266
277
  #
267
278
  # The overall structure of a run looks like this:
268
279
  #
280
+ # [Minitest.load_plugins] optional, called by user, or require what you want
269
281
  # Minitest.autorun
270
282
  # Minitest.run(args)
271
- # Minitest.load_plugins
272
283
  # Minitest.process_args
273
284
  # Minitest.init_plugins
274
- # Minitest.__run(reporter, options)
285
+ # Minitest.run_all_suites(reporter, options)
275
286
  # Runnable.runnables.each |runnable_klass|
276
- # runnable_klass.run(reporter, options)
277
- # filtered_methods = runnable_methods.select {...}.reject {...}
287
+ # runnable_klass.run_suite(reporter, options)
288
+ # filtered_methods = runnable_klass.filter_runnable_methods options
278
289
  # filtered_methods.each |runnable_method|
279
- # runnable_klass.run_one_method(self, runnable_method, reporter)
280
- # Minitest.run_one_method(runnable_klass, runnable_method)
281
- # runnable_klass.new(runnable_method).run
290
+ # runnable_klass.run(self, runnable_method, reporter)
291
+ # runnable_klass.new(runnable_method).run
282
292
 
283
293
  def self.run args = []
284
- self.load_plugins unless args.delete("--no-plugins") || ENV["MT_NO_PLUGINS"]
285
-
286
294
  options = process_args args
287
295
 
288
296
  Minitest.seed = options[:seed]
@@ -299,7 +307,7 @@ module Minitest
299
307
  self.parallel_executor.start if parallel_executor.respond_to? :start
300
308
  reporter.start
301
309
  begin
302
- __run reporter, options
310
+ run_all_suites reporter, options
303
311
  finished = true
304
312
  rescue Interrupt
305
313
  warn "Interrupted. Exiting..."
@@ -316,7 +324,7 @@ module Minitest
316
324
  end
317
325
 
318
326
  def self.empty_run! options # :nodoc:
319
- filter = options[:filter]
327
+ filter = options[:include]
320
328
  return true unless filter # no filter, but nothing ran == success
321
329
 
322
330
  warn "Nothing ran for filter: %s" % [filter]
@@ -335,17 +343,17 @@ module Minitest
335
343
  # Internal run method. Responsible for telling all Runnable
336
344
  # sub-classes to run.
337
345
 
338
- def self.__run reporter, options
346
+ def self.run_all_suites reporter, options
339
347
  suites = Runnable.runnables.shuffle
340
- parallel, serial = suites.partition { |s| s.test_order == :parallel }
348
+ parallel, serial = suites.partition { |s| s.run_order == :parallel }
341
349
 
342
350
  # If we run the parallel tests before the serial tests, the parallel tests
343
351
  # could run in parallel with the serial tests. This would be bad because
344
352
  # the serial tests won't lock around Reporter#record. Run the serial tests
345
353
  # first, so that after they complete, the parallel tests will lock when
346
354
  # recording results.
347
- serial.map { |suite| suite.run reporter, options } +
348
- parallel.map { |suite| suite.run reporter, options }
355
+ serial.map { |suite| suite.run_suite reporter, options } +
356
+ parallel.map { |suite| suite.run_suite reporter, options }
349
357
  end
350
358
 
351
359
  def self.filter_backtrace bt # :nodoc:
@@ -413,21 +421,30 @@ module Minitest
413
421
  reset
414
422
 
415
423
  ##
416
- # Responsible for running all runnable methods in a given class,
417
- # each in its own instance. Each instance is passed to the
418
- # reporter to record.
424
+ # Returns an array of filtered +runnable_methods+. Uses
425
+ # options[:include] (--include arguments) and options[:exclude]
426
+ # (--exclude arguments) values to filter.
419
427
 
420
- def self.run reporter, options = {}
421
- pos = options[:filter]
428
+ def self.filter_runnable_methods options={}
429
+ pos = options[:include]
422
430
  neg = options[:exclude]
423
431
 
424
432
  pos = Regexp.new $1 if pos.kind_of?(String) && pos =~ %r%/(.*)/%
425
433
  neg = Regexp.new $1 if neg.kind_of?(String) && neg =~ %r%/(.*)/%
426
434
 
427
435
  # at most 1-2% slower than a 1-pass version, stop optimizing this
428
- filtered_methods = self.runnable_methods
436
+ self.runnable_methods
429
437
  .select { |m| !pos || pos === m || pos === "#{self}##{m}" }
430
438
  .reject { |m| neg && (neg === m || neg === "#{self}##{m}") }
439
+ end
440
+
441
+ ##
442
+ # Responsible for running all runnable methods in a given class,
443
+ # each in its own instance. Each instance is passed to the
444
+ # reporter to record.
445
+
446
+ def Runnable.run_suite reporter, options = {}
447
+ filtered_methods = filter_runnable_methods options
431
448
 
432
449
  return if filtered_methods.empty?
433
450
 
@@ -442,12 +459,12 @@ module Minitest
442
459
  warn "Current: %s#%s %.2fs" % [self, name, Minitest.clock_time - t0]
443
460
  end
444
461
 
445
- with_info_handler reporter do
462
+ with_info_handler do
446
463
  filtered_methods.each do |method_name|
447
464
  name = method_name
448
465
  t0 = Minitest.clock_time
449
466
 
450
- run_one_method self, method_name, reporter
467
+ run self, method_name, reporter
451
468
  end
452
469
  end
453
470
  end
@@ -458,20 +475,20 @@ module Minitest
458
475
  # that subclasses can specialize the running of an individual
459
476
  # test. See Minitest::ParallelTest::ClassMethods for an example.
460
477
 
461
- def self.run_one_method klass, method_name, reporter
478
+ def Runnable.run klass, method_name, reporter
462
479
  reporter.prerecord klass, method_name
463
- reporter.record Minitest.run_one_method(klass, method_name)
480
+ reporter.record klass.new(method_name).run
464
481
  end
465
482
 
466
483
  ##
467
484
  # Defines the order to run tests (:random by default). Override
468
485
  # this or use a convenience method to change it for your tests.
469
486
 
470
- def self.test_order
487
+ def self.run_order
471
488
  :random
472
489
  end
473
490
 
474
- def self.with_info_handler reporter, &block # :nodoc:
491
+ def self.with_info_handler _reporter=nil, &block # :nodoc:
475
492
  on_signal ::Minitest.info_signal, @_info_handler, &block
476
493
  end
477
494
 
@@ -505,22 +522,6 @@ module Minitest
505
522
  @@runnables
506
523
  end
507
524
 
508
- @@marshal_dump_warned = false
509
-
510
- def marshal_dump # :nodoc:
511
- unless @@marshal_dump_warned then
512
- warn ["Minitest::Runnable#marshal_dump is deprecated.",
513
- "You might be violating internals. From", caller(1..1).first].join " "
514
- @@marshal_dump_warned = true
515
- end
516
-
517
- [self.name, self.failures, self.assertions, self.time]
518
- end
519
-
520
- def marshal_load ary # :nodoc:
521
- self.name, self.failures, self.assertions, self.time = ary
522
- end
523
-
524
525
  def failure # :nodoc:
525
526
  self.failures.first
526
527
  end
@@ -652,9 +653,6 @@ module Minitest
652
653
  class Result < Runnable
653
654
  include Minitest::Reportable
654
655
 
655
- undef_method :marshal_dump
656
- undef_method :marshal_load
657
-
658
656
  ##
659
657
  # The class name of the test result.
660
658
 
@@ -1014,8 +1012,7 @@ module Minitest
1014
1012
 
1015
1013
  def prerecord klass, name # :nodoc:
1016
1014
  self.reporters.each do |reporter|
1017
- # TODO: remove conditional for minitest 6
1018
- reporter.prerecord klass, name if reporter.respond_to? :prerecord
1015
+ reporter.prerecord klass, name
1019
1016
  end
1020
1017
  end
1021
1018
 
@@ -1141,16 +1138,6 @@ module Minitest
1141
1138
  "java" == platform
1142
1139
  end
1143
1140
 
1144
- ##
1145
- # Is this running on maglev?
1146
-
1147
- def maglev? platform = defined?(RUBY_ENGINE) && RUBY_ENGINE
1148
- where = Minitest.filter_backtrace(caller).first
1149
- where = where.split(":in ", 2).first # clean up noise
1150
- warn "DEPRECATED: `maglev?` called from #{where}. This will fail in Minitest 6."
1151
- "maglev" == platform
1152
- end
1153
-
1154
1141
  ##
1155
1142
  # Is this running on mri?
1156
1143
 
@@ -1165,16 +1152,6 @@ module Minitest
1165
1152
  platform.include? "darwin"
1166
1153
  end
1167
1154
 
1168
- ##
1169
- # Is this running on rubinius?
1170
-
1171
- def rubinius? platform = defined?(RUBY_ENGINE) && RUBY_ENGINE
1172
- where = Minitest.filter_backtrace(caller).first
1173
- where = where.split(":in ", 2).first # clean up noise
1174
- warn "DEPRECATED: `rubinius?` called from #{where}. This will fail in Minitest 6."
1175
- "rbx" == platform
1176
- end
1177
-
1178
1155
  ##
1179
1156
  # Is this running on windows?
1180
1157
 
@@ -1220,12 +1197,6 @@ module Minitest
1220
1197
 
1221
1198
  self.backtrace_filter = BacktraceFilter.new
1222
1199
 
1223
- def self.run_one_method klass, method_name # :nodoc:
1224
- result = klass.new(method_name).run
1225
- raise "#{klass}#run _must_ return a Result" unless Result === result
1226
- result
1227
- end
1228
-
1229
1200
  # :stopdoc:
1230
1201
 
1231
1202
  if defined? Process::CLOCK_MONOTONIC # :nodoc:
@@ -1248,4 +1219,4 @@ module Minitest
1248
1219
  # :startdoc:
1249
1220
  end
1250
1221
 
1251
- require "minitest/test"
1222
+ require_relative "minitest/test"
@@ -79,7 +79,7 @@ class MetaMetaMetaTestCase < Minitest::Test
79
79
  @tus.each do |tu|
80
80
  Minitest::Runnable.runnables.delete tu
81
81
 
82
- tu.run reporter, options
82
+ tu.run_suite reporter, options
83
83
  end
84
84
 
85
85
  reporter.report