type_toolkit 0.0.2 → 0.0.3

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 (70) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +33 -0
  3. data/README.md +106 -15
  4. data/Rakefile +26 -2
  5. data/config/default.yml +4 -0
  6. data/lib/rubocop/cop/type_toolkit/dont_expect_unexpected_nil.rb +115 -0
  7. data/lib/rubocop-type_toolkit.rb +7 -0
  8. data/lib/type_toolkit/ext/nil_assertions.rb +36 -0
  9. data/lib/type_toolkit/version.rb +2 -1
  10. data/lib/type_toolkit.rb +2 -2
  11. data/sorbet/config +7 -0
  12. data/sorbet/rbi/annotations/.gitattributes +1 -0
  13. data/sorbet/rbi/annotations/minitest.rbi +120 -0
  14. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  15. data/sorbet/rbi/gems/.gitattributes +1 -0
  16. data/sorbet/rbi/gems/ast@2.4.3.rbi +586 -0
  17. data/sorbet/rbi/gems/benchmark@0.5.0.rbi +637 -0
  18. data/sorbet/rbi/gems/date@3.5.1.rbi +403 -0
  19. data/sorbet/rbi/gems/erb@6.0.1.rbi +816 -0
  20. data/sorbet/rbi/gems/erubi@1.13.1.rbi +157 -0
  21. data/sorbet/rbi/gems/io-console@0.8.2.rbi +9 -0
  22. data/sorbet/rbi/gems/json@2.18.1.rbi +2340 -0
  23. data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
  24. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +119 -0
  25. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  26. data/sorbet/rbi/gems/minitest@5.27.0.rbi +1549 -0
  27. data/sorbet/rbi/gems/netrc@0.11.0.rbi +177 -0
  28. data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
  29. data/sorbet/rbi/gems/parser@3.3.10.2.rbi +5537 -0
  30. data/sorbet/rbi/gems/pp@0.6.3.rbi +376 -0
  31. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +477 -0
  32. data/sorbet/rbi/gems/prism@1.9.0.rbi +43414 -0
  33. data/sorbet/rbi/gems/psych@5.3.1.rbi +2542 -0
  34. data/sorbet/rbi/gems/racc@1.8.1.rbi +168 -0
  35. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  36. data/sorbet/rbi/gems/rake@13.3.1.rbi +3036 -0
  37. data/sorbet/rbi/gems/rbi@0.3.9.rbi +5238 -0
  38. data/sorbet/rbi/gems/rbs@4.0.0.dev.5.rbi +8393 -0
  39. data/sorbet/rbi/gems/rdoc@7.2.0.rbi +13378 -0
  40. data/sorbet/rbi/gems/regexp_parser@2.11.3.rbi +3883 -0
  41. data/sorbet/rbi/gems/reline@0.6.3.rbi +2995 -0
  42. data/sorbet/rbi/gems/require-hooks@0.2.2.rbi +110 -0
  43. data/sorbet/rbi/gems/rexml@3.4.4.rbi +5258 -0
  44. data/sorbet/rbi/gems/rubocop-ast@1.49.0.rbi +7456 -0
  45. data/sorbet/rbi/gems/rubocop-minitest@0.38.2.rbi +2649 -0
  46. data/sorbet/rbi/gems/rubocop-rake@0.7.1.rbi +328 -0
  47. data/sorbet/rbi/gems/rubocop-shopify@2.18.0.rbi +9 -0
  48. data/sorbet/rbi/gems/rubocop@1.84.2.rbi +64803 -0
  49. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  50. data/sorbet/rbi/gems/spoom@1.7.11.rbi +5878 -0
  51. data/sorbet/rbi/gems/stringio@3.2.0.rbi +9 -0
  52. data/sorbet/rbi/gems/tapioca@0.17.10.rbi +3513 -0
  53. data/sorbet/rbi/gems/thor@1.5.0.rbi +4476 -0
  54. data/sorbet/rbi/gems/tsort@0.2.0.rbi +393 -0
  55. data/sorbet/rbi/gems/unicode-display_width@3.2.0.rbi +132 -0
  56. data/sorbet/rbi/gems/unicode-emoji@4.2.0.rbi +254 -0
  57. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +430 -0
  58. data/sorbet/rbi/gems/yard@0.9.38.rbi +18425 -0
  59. data/sorbet/rbi/shims/lint_roller.rbi +6 -0
  60. data/sorbet/rbi/shims/minitest.rbi +43 -0
  61. data/sorbet/rbi/shims/rubocop_minitest.rbi +17 -0
  62. data/sorbet/rbi/todo.rbi +5 -0
  63. data/sorbet/tapioca/config.yml +13 -0
  64. data/sorbet/tapioca/require.rb +5 -0
  65. data/spec/.rubocop.yml +13 -0
  66. data/spec/nil_assertions_spec.rb +19 -0
  67. data/spec/rubocop/cop/type_toolkit/dont_expect_unexpected_nil_spec.rb +194 -0
  68. data/spec/spec_helper.rb +8 -0
  69. data/spec/type_toolkit_spec.rb +11 -0
  70. metadata +65 -1
@@ -0,0 +1,1549 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `minitest` gem.
5
+ # Please instead update this file by running `bin/tapioca gem minitest`.
6
+
7
+
8
+ # The top-level namespace for Minitest. Also the location of the main
9
+ # runtime. See +Minitest.run+ for more information.
10
+ #
11
+ # source://minitest//lib/minitest/parallel.rb#3
12
+ module Minitest
13
+ class << self
14
+ # Internal run method. Responsible for telling all Runnable
15
+ # sub-classes to run.
16
+ #
17
+ # source://minitest//lib/minitest.rb#337
18
+ def __run(reporter, options); end
19
+
20
+ # A simple hook allowing you to run a block of code after everything
21
+ # is done running. Eg:
22
+ #
23
+ # Minitest.after_run { p $debugging_info }
24
+ #
25
+ # source://minitest//lib/minitest.rb#96
26
+ def after_run(&block); end
27
+
28
+ # source://minitest//lib/minitest.rb#20
29
+ def allow_fork; end
30
+
31
+ # source://minitest//lib/minitest.rb#20
32
+ def allow_fork=(_arg0); end
33
+
34
+ # Registers Minitest to run at process exit
35
+ #
36
+ # source://minitest//lib/minitest.rb#70
37
+ def autorun; end
38
+
39
+ # source://minitest//lib/minitest.rb#20
40
+ def backtrace_filter; end
41
+
42
+ # source://minitest//lib/minitest.rb#20
43
+ def backtrace_filter=(_arg0); end
44
+
45
+ # source://minitest//lib/minitest.rb#19
46
+ def cattr_accessor(name); end
47
+
48
+ # source://minitest//lib/minitest.rb#1231
49
+ def clock_time; end
50
+
51
+ # source://minitest//lib/minitest.rb#317
52
+ def empty_run!(options); end
53
+
54
+ # source://minitest//lib/minitest.rb#20
55
+ def extensions; end
56
+
57
+ # source://minitest//lib/minitest.rb#20
58
+ def extensions=(_arg0); end
59
+
60
+ # source://minitest//lib/minitest.rb#350
61
+ def filter_backtrace(bt); end
62
+
63
+ # source://minitest//lib/minitest.rb#20
64
+ def info_signal; end
65
+
66
+ # source://minitest//lib/minitest.rb#20
67
+ def info_signal=(_arg0); end
68
+
69
+ # source://minitest//lib/minitest.rb#124
70
+ def init_plugins(options); end
71
+
72
+ # source://minitest//lib/minitest.rb#108
73
+ def load_plugins; end
74
+
75
+ # source://minitest//lib/minitest.rb#20
76
+ def parallel_executor; end
77
+
78
+ # source://minitest//lib/minitest.rb#20
79
+ def parallel_executor=(_arg0); end
80
+
81
+ # source://minitest//lib/minitest.rb#142
82
+ def process_args(args = T.unsafe(nil)); end
83
+
84
+ # Register a plugin to be used. Does NOT require / load it.
85
+ #
86
+ # source://minitest//lib/minitest.rb#103
87
+ def register_plugin(name_or_mod); end
88
+
89
+ # source://minitest//lib/minitest.rb#20
90
+ def reporter; end
91
+
92
+ # source://minitest//lib/minitest.rb#20
93
+ def reporter=(_arg0); end
94
+
95
+ # This is the top-level run method. Everything starts from here. It
96
+ # tells each Runnable sub-class to run, and each of those are
97
+ # responsible for doing whatever they do.
98
+ #
99
+ # The overall structure of a run looks like this:
100
+ #
101
+ # Minitest.autorun
102
+ # Minitest.run(args)
103
+ # Minitest.load_plugins
104
+ # Minitest.process_args
105
+ # Minitest.init_plugins
106
+ # Minitest.__run(reporter, options)
107
+ # Runnable.runnables.each |runnable_klass|
108
+ # runnable_klass.run(reporter, options)
109
+ # filtered_methods = runnable_methods.select {...}.reject {...}
110
+ # filtered_methods.each |runnable_method|
111
+ # runnable_klass.run_one_method(self, runnable_method, reporter)
112
+ # Minitest.run_one_method(runnable_klass, runnable_method)
113
+ # runnable_klass.new(runnable_method).run
114
+ #
115
+ # source://minitest//lib/minitest.rb#282
116
+ def run(args = T.unsafe(nil)); end
117
+
118
+ # source://minitest//lib/minitest.rb#1222
119
+ def run_one_method(klass, method_name); end
120
+
121
+ # source://minitest//lib/minitest.rb#20
122
+ def seed; end
123
+
124
+ # source://minitest//lib/minitest.rb#20
125
+ def seed=(_arg0); end
126
+ end
127
+ end
128
+
129
+ # Defines the API for Reporters. Subclass this and override whatever
130
+ # you want. Go nuts.
131
+ #
132
+ # source://minitest//lib/minitest.rb#702
133
+ class Minitest::AbstractReporter
134
+ # @return [AbstractReporter] a new instance of AbstractReporter
135
+ #
136
+ # source://minitest//lib/minitest.rb#704
137
+ def initialize; end
138
+
139
+ # Did this run pass?
140
+ #
141
+ # @return [Boolean]
142
+ #
143
+ # source://minitest//lib/minitest.rb#739
144
+ def passed?; end
145
+
146
+ # About to start running a test. This allows a reporter to show
147
+ # that it is starting or that we are in the middle of a test run.
148
+ #
149
+ # source://minitest//lib/minitest.rb#718
150
+ def prerecord(klass, name); end
151
+
152
+ # Output and record the result of the test. Call
153
+ # {result#result_code}[rdoc-ref:Runnable#result_code] to get the
154
+ # result character string. Stores the result of the run if the run
155
+ # did not pass.
156
+ #
157
+ # source://minitest//lib/minitest.rb#727
158
+ def record(result); end
159
+
160
+ # Outputs the summary of the run.
161
+ #
162
+ # source://minitest//lib/minitest.rb#733
163
+ def report; end
164
+
165
+ # Starts reporting on the run.
166
+ #
167
+ # source://minitest//lib/minitest.rb#711
168
+ def start; end
169
+
170
+ # source://minitest//lib/minitest.rb#743
171
+ def synchronize(&block); end
172
+ end
173
+
174
+ # Represents run failures.
175
+ #
176
+ # source://minitest//lib/minitest.rb#1035
177
+ class Minitest::Assertion < ::Exception
178
+ # source://minitest//lib/minitest.rb#1038
179
+ def error; end
180
+
181
+ # Where was this run before an assertion was raised?
182
+ #
183
+ # source://minitest//lib/minitest.rb#1045
184
+ def location; end
185
+
186
+ # source://minitest//lib/minitest.rb#1053
187
+ def result_code; end
188
+
189
+ # source://minitest//lib/minitest.rb#1057
190
+ def result_label; end
191
+ end
192
+
193
+ # source://minitest//lib/minitest.rb#1036
194
+ Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp)
195
+
196
+ # Minitest Assertions. All assertion methods accept a +msg+ which is
197
+ # printed if the assertion fails.
198
+ #
199
+ # Protocol: Nearly everything here boils up to +assert+, which
200
+ # expects to be able to increment an instance accessor named
201
+ # +assertions+. This is not provided by Assertions and must be
202
+ # provided by the thing including Assertions. See Minitest::Runnable
203
+ # for an example.
204
+ #
205
+ # source://minitest//lib/minitest/assertions.rb#16
206
+ module Minitest::Assertions
207
+ # source://minitest//lib/minitest/assertions.rb#199
208
+ def _caller_uplevel; end
209
+
210
+ # source://minitest//lib/minitest/assertions.rb#181
211
+ def _synchronize; end
212
+
213
+ # source://minitest//lib/minitest/assertions.rb#194
214
+ def _where; end
215
+
216
+ # Fails unless +test+ is truthy.
217
+ #
218
+ # source://minitest//lib/minitest/assertions.rb#171
219
+ def assert(test, msg = T.unsafe(nil)); end
220
+
221
+ # Fails unless +obj+ is empty.
222
+ #
223
+ # source://minitest//lib/minitest/assertions.rb#188
224
+ def assert_empty(obj, msg = T.unsafe(nil)); end
225
+
226
+ # Fails unless <tt>exp == act</tt> printing the difference between
227
+ # the two, if possible.
228
+ #
229
+ # If there is no visible difference but the assertion fails, you
230
+ # should suspect that your #== is buggy, or your inspect output is
231
+ # missing crucial details. For nicer structural diffing, set
232
+ # Minitest::Test.make_my_diffs_pretty!
233
+ #
234
+ # For floats use assert_in_delta.
235
+ #
236
+ # See also: Minitest::Assertions.diff
237
+ #
238
+ # source://minitest//lib/minitest/assertions.rb#220
239
+ def assert_equal(exp, act, msg = T.unsafe(nil)); end
240
+
241
+ # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+
242
+ # of each other.
243
+ #
244
+ # assert_in_delta Math::PI, (22.0 / 7.0), 0.01
245
+ #
246
+ # source://minitest//lib/minitest/assertions.rb#241
247
+ def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
248
+
249
+ # For comparing Floats. Fails unless +exp+ and +act+ have a relative
250
+ # error less than +epsilon+.
251
+ #
252
+ # source://minitest//lib/minitest/assertions.rb#253
253
+ def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
254
+
255
+ # Fails unless +collection+ includes +obj+.
256
+ #
257
+ # source://minitest//lib/minitest/assertions.rb#260
258
+ def assert_includes(collection, obj, msg = T.unsafe(nil)); end
259
+
260
+ # Fails unless +obj+ is an instance of +cls+.
261
+ #
262
+ # source://minitest//lib/minitest/assertions.rb#271
263
+ def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end
264
+
265
+ # Fails unless +obj+ is a kind of +cls+.
266
+ #
267
+ # source://minitest//lib/minitest/assertions.rb#282
268
+ def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end
269
+
270
+ # Fails unless +matcher+ <tt>=~</tt> +obj+.
271
+ #
272
+ # source://minitest//lib/minitest/assertions.rb#293
273
+ def assert_match(matcher, obj, msg = T.unsafe(nil)); end
274
+
275
+ # Fails unless +obj+ is nil
276
+ #
277
+ # source://minitest//lib/minitest/assertions.rb#305
278
+ def assert_nil(obj, msg = T.unsafe(nil)); end
279
+
280
+ # For testing with binary operators. Eg:
281
+ #
282
+ # assert_operator 5, :<=, 4
283
+ #
284
+ # source://minitest//lib/minitest/assertions.rb#315
285
+ def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
286
+
287
+ # Fails if stdout or stderr do not output the expected results.
288
+ # Pass in nil if you don't care about that streams output. Pass in
289
+ # "" if you require it to be silent. Pass in a regexp if you want
290
+ # to pattern match.
291
+ #
292
+ # assert_output(/hey/) { method_with_output }
293
+ #
294
+ # NOTE: this uses #capture_io, not #capture_subprocess_io.
295
+ #
296
+ # See also: #assert_silent
297
+ #
298
+ # source://minitest//lib/minitest/assertions.rb#333
299
+ def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end
300
+
301
+ # Fails unless +path+ exists.
302
+ #
303
+ # source://minitest//lib/minitest/assertions.rb#357
304
+ def assert_path_exists(path, msg = T.unsafe(nil)); end
305
+
306
+ # For testing with pattern matching (only supported with Ruby 3.0 and later)
307
+ #
308
+ # # pass
309
+ # assert_pattern { [1,2,3] => [Integer, Integer, Integer] }
310
+ #
311
+ # # fail "length mismatch (given 3, expected 1)"
312
+ # assert_pattern { [1,2,3] => [Integer] }
313
+ #
314
+ # The bare <tt>=></tt> pattern will raise a NoMatchingPatternError on failure, which would
315
+ # normally be counted as a test error. This assertion rescues NoMatchingPatternError and
316
+ # generates a test failure. Any other exception will be raised as normal and generate a test
317
+ # error.
318
+ #
319
+ # source://minitest//lib/minitest/assertions.rb#376
320
+ def assert_pattern; end
321
+
322
+ # For testing with predicates. Eg:
323
+ #
324
+ # assert_predicate str, :empty?
325
+ #
326
+ # This is really meant for specs and is front-ended by assert_operator:
327
+ #
328
+ # str.must_be :empty?
329
+ #
330
+ # source://minitest//lib/minitest/assertions.rb#394
331
+ def assert_predicate(o1, op, msg = T.unsafe(nil)); end
332
+
333
+ # Fails unless the block raises one of +exp+. Returns the
334
+ # exception matched so you can check the message, attributes, etc.
335
+ #
336
+ # +exp+ takes an optional message on the end to help explain
337
+ # failures and defaults to StandardError if no exception class is
338
+ # passed. Eg:
339
+ #
340
+ # assert_raises(CustomError) { method_with_custom_error }
341
+ #
342
+ # With custom error message:
343
+ #
344
+ # assert_raises(CustomError, 'This should have raised CustomError') { method_with_custom_error }
345
+ #
346
+ # Using the returned object:
347
+ #
348
+ # error = assert_raises(CustomError) do
349
+ # raise CustomError, 'This is really bad'
350
+ # end
351
+ #
352
+ # assert_equal 'This is really bad', error.message
353
+ #
354
+ # source://minitest//lib/minitest/assertions.rb#421
355
+ def assert_raises(*exp); end
356
+
357
+ # Fails unless +obj+ responds to +meth+.
358
+ # include_all defaults to false to match Object#respond_to?
359
+ #
360
+ # source://minitest//lib/minitest/assertions.rb#453
361
+ def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end
362
+
363
+ # Fails unless +exp+ and +act+ are #equal?
364
+ #
365
+ # source://minitest//lib/minitest/assertions.rb#463
366
+ def assert_same(exp, act, msg = T.unsafe(nil)); end
367
+
368
+ # +send_ary+ is a receiver, message and arguments.
369
+ #
370
+ # Fails unless the call returns a true value
371
+ #
372
+ # source://minitest//lib/minitest/assertions.rb#476
373
+ def assert_send(send_ary, m = T.unsafe(nil)); end
374
+
375
+ # Fails if the block outputs anything to stderr or stdout.
376
+ #
377
+ # See also: #assert_output
378
+ #
379
+ # source://minitest//lib/minitest/assertions.rb#491
380
+ def assert_silent; end
381
+
382
+ # Fails unless the block throws +sym+
383
+ #
384
+ # source://minitest//lib/minitest/assertions.rb#500
385
+ def assert_throws(sym, msg = T.unsafe(nil)); end
386
+
387
+ # Captures $stdout and $stderr into strings:
388
+ #
389
+ # out, err = capture_io do
390
+ # puts "Some info"
391
+ # warn "You did a bad thing"
392
+ # end
393
+ #
394
+ # assert_match %r%info%, out
395
+ # assert_match %r%bad%, err
396
+ #
397
+ # NOTE: For efficiency, this method uses StringIO and does not
398
+ # capture IO for subprocesses. Use #capture_subprocess_io for
399
+ # that.
400
+ #
401
+ # source://minitest//lib/minitest/assertions.rb#536
402
+ def capture_io; end
403
+
404
+ # Captures $stdout and $stderr into strings, using Tempfile to
405
+ # ensure that subprocess IO is captured as well.
406
+ #
407
+ # out, err = capture_subprocess_io do
408
+ # system "echo Some info"
409
+ # system "echo You did a bad thing 1>&2"
410
+ # end
411
+ #
412
+ # assert_match %r%info%, out
413
+ # assert_match %r%bad%, err
414
+ #
415
+ # NOTE: This method is approximately 10x slower than #capture_io so
416
+ # only use it when you need to test the output of a subprocess.
417
+ #
418
+ # source://minitest//lib/minitest/assertions.rb#569
419
+ def capture_subprocess_io; end
420
+
421
+ # Returns a diff between +exp+ and +act+. If there is no known
422
+ # diff command or if it doesn't make sense to diff the output
423
+ # (single line, short output), then it simply returns a basic
424
+ # comparison between the two.
425
+ #
426
+ # See +things_to_diff+ for more info.
427
+ #
428
+ # source://minitest//lib/minitest/assertions.rb#57
429
+ def diff(exp, act); end
430
+
431
+ # Returns details for exception +e+
432
+ #
433
+ # source://minitest//lib/minitest/assertions.rb#601
434
+ def exception_details(e, msg); end
435
+
436
+ # Fails after a given date (in the local time zone). This allows
437
+ # you to put time-bombs in your tests if you need to keep
438
+ # something around until a later date lest you forget about it.
439
+ #
440
+ # source://minitest//lib/minitest/assertions.rb#617
441
+ def fail_after(y, m, d, msg); end
442
+
443
+ # Fails with +msg+.
444
+ #
445
+ # source://minitest//lib/minitest/assertions.rb#624
446
+ def flunk(msg = T.unsafe(nil)); end
447
+
448
+ # Returns a proc that will output +msg+ along with the default message.
449
+ #
450
+ # source://minitest//lib/minitest/assertions.rb#632
451
+ def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end
452
+
453
+ # This returns a human-readable version of +obj+. By default
454
+ # #inspect is called. You can override this to use #pretty_inspect
455
+ # if you want.
456
+ #
457
+ # See Minitest::Test.make_my_diffs_pretty!
458
+ #
459
+ # source://minitest//lib/minitest/assertions.rb#127
460
+ def mu_pp(obj); end
461
+
462
+ # This returns a diff-able more human-readable version of +obj+.
463
+ # This differs from the regular mu_pp because it expands escaped
464
+ # newlines and makes hex-values (like object_ids) generic. This
465
+ # uses mu_pp to do the first pass and then cleans it up.
466
+ #
467
+ # source://minitest//lib/minitest/assertions.rb#145
468
+ def mu_pp_for_diff(obj); end
469
+
470
+ # used for counting assertions
471
+ #
472
+ # source://minitest//lib/minitest/assertions.rb#643
473
+ def pass(_msg = T.unsafe(nil)); end
474
+
475
+ # Fails if +test+ is truthy.
476
+ #
477
+ # source://minitest//lib/minitest/assertions.rb#650
478
+ def refute(test, msg = T.unsafe(nil)); end
479
+
480
+ # Fails if +obj+ is empty.
481
+ #
482
+ # source://minitest//lib/minitest/assertions.rb#658
483
+ def refute_empty(obj, msg = T.unsafe(nil)); end
484
+
485
+ # Fails if <tt>exp == act</tt>.
486
+ #
487
+ # For floats use refute_in_delta.
488
+ #
489
+ # source://minitest//lib/minitest/assertions.rb#669
490
+ def refute_equal(exp, act, msg = T.unsafe(nil)); end
491
+
492
+ # For comparing Floats. Fails if +exp+ is within +delta+ of +act+.
493
+ #
494
+ # refute_in_delta Math::PI, (22.0 / 7.0)
495
+ #
496
+ # source://minitest//lib/minitest/assertions.rb#681
497
+ def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
498
+
499
+ # For comparing Floats. Fails if +exp+ and +act+ have a relative error
500
+ # less than +epsilon+.
501
+ #
502
+ # source://minitest//lib/minitest/assertions.rb#693
503
+ def refute_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
504
+
505
+ # Fails if +collection+ includes +obj+.
506
+ #
507
+ # source://minitest//lib/minitest/assertions.rb#700
508
+ def refute_includes(collection, obj, msg = T.unsafe(nil)); end
509
+
510
+ # Fails if +obj+ is an instance of +cls+.
511
+ #
512
+ # source://minitest//lib/minitest/assertions.rb#711
513
+ def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end
514
+
515
+ # Fails if +obj+ is a kind of +cls+.
516
+ #
517
+ # source://minitest//lib/minitest/assertions.rb#721
518
+ def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end
519
+
520
+ # Fails if +matcher+ <tt>=~</tt> +obj+.
521
+ #
522
+ # source://minitest//lib/minitest/assertions.rb#729
523
+ def refute_match(matcher, obj, msg = T.unsafe(nil)); end
524
+
525
+ # Fails if +obj+ is nil.
526
+ #
527
+ # source://minitest//lib/minitest/assertions.rb#739
528
+ def refute_nil(obj, msg = T.unsafe(nil)); end
529
+
530
+ # Fails if +o1+ is not +op+ +o2+. Eg:
531
+ #
532
+ # refute_operator 1, :>, 2 #=> pass
533
+ # refute_operator 1, :<, 2 #=> fail
534
+ #
535
+ # source://minitest//lib/minitest/assertions.rb#771
536
+ def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
537
+
538
+ # Fails if +path+ exists.
539
+ #
540
+ # source://minitest//lib/minitest/assertions.rb#780
541
+ def refute_path_exists(path, msg = T.unsafe(nil)); end
542
+
543
+ # For testing with pattern matching (only supported with Ruby 3.0 and later)
544
+ #
545
+ # # pass
546
+ # refute_pattern { [1,2,3] => [String] }
547
+ #
548
+ # # fail "NoMatchingPatternError expected, but nothing was raised."
549
+ # refute_pattern { [1,2,3] => [Integer, Integer, Integer] }
550
+ #
551
+ # This assertion expects a NoMatchingPatternError exception, and will fail if none is raised. Any
552
+ # other exceptions will be raised as normal and generate a test error.
553
+ #
554
+ # source://minitest//lib/minitest/assertions.rb#756
555
+ def refute_pattern; end
556
+
557
+ # For testing with predicates.
558
+ #
559
+ # refute_predicate str, :empty?
560
+ #
561
+ # This is really meant for specs and is front-ended by refute_operator:
562
+ #
563
+ # str.wont_be :empty?
564
+ #
565
+ # source://minitest//lib/minitest/assertions.rb#794
566
+ def refute_predicate(o1, op, msg = T.unsafe(nil)); end
567
+
568
+ # Fails if +obj+ responds to the message +meth+.
569
+ # include_all defaults to false to match Object#respond_to?
570
+ #
571
+ # source://minitest//lib/minitest/assertions.rb#803
572
+ def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end
573
+
574
+ # Fails if +exp+ is the same (by object identity) as +act+.
575
+ #
576
+ # source://minitest//lib/minitest/assertions.rb#812
577
+ def refute_same(exp, act, msg = T.unsafe(nil)); end
578
+
579
+ # Skips the current run. If run in verbose-mode, the skipped run
580
+ # gets listed at the end of the run but doesn't cause a failure
581
+ # exit code.
582
+ #
583
+ # @raise [Minitest::Skip]
584
+ #
585
+ # source://minitest//lib/minitest/assertions.rb#825
586
+ def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end
587
+
588
+ # Skips the current run until a given date (in the local time
589
+ # zone). This allows you to put some fixes on hold until a later
590
+ # date, but still holds you accountable and prevents you from
591
+ # forgetting it.
592
+ #
593
+ # source://minitest//lib/minitest/assertions.rb#837
594
+ def skip_until(y, m, d, msg); end
595
+
596
+ # Was this testcase skipped? Meant for #teardown.
597
+ #
598
+ # @return [Boolean]
599
+ #
600
+ # source://minitest//lib/minitest/assertions.rb#846
601
+ def skipped?; end
602
+
603
+ # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff.
604
+ #
605
+ # Criterion:
606
+ #
607
+ # 1. Strings include newlines or escaped newlines, but not both.
608
+ # 2. or: String lengths are > 30 characters.
609
+ # 3. or: Strings are equal to each other (but maybe different encodings?).
610
+ # 4. and: we found a diff executable.
611
+ #
612
+ # source://minitest//lib/minitest/assertions.rb#102
613
+ def things_to_diff(exp, act); end
614
+
615
+ class << self
616
+ # Returns the diff command to use in #diff. Tries to intelligently
617
+ # figure out what diff to use.
618
+ #
619
+ # source://minitest//lib/minitest/assertions.rb#27
620
+ def diff; end
621
+
622
+ # Set the diff command to use in #diff.
623
+ #
624
+ # source://minitest//lib/minitest/assertions.rb#45
625
+ def diff=(o); end
626
+ end
627
+ end
628
+
629
+ # source://minitest//lib/minitest/assertions.rb#205
630
+ Minitest::Assertions::E = T.let(T.unsafe(nil), String)
631
+
632
+ # source://minitest//lib/minitest/assertions.rb#17
633
+ Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object)
634
+
635
+ # The standard backtrace filter for minitest.
636
+ #
637
+ # See Minitest.backtrace_filter=.
638
+ #
639
+ # source://minitest//lib/minitest.rb#1190
640
+ class Minitest::BacktraceFilter
641
+ # @return [BacktraceFilter] a new instance of BacktraceFilter
642
+ #
643
+ # source://minitest//lib/minitest.rb#1199
644
+ def initialize(regexp = T.unsafe(nil)); end
645
+
646
+ # Filter +bt+ to something useful. Returns the whole thing if
647
+ # $DEBUG (ruby) or $MT_DEBUG (env).
648
+ #
649
+ # source://minitest//lib/minitest.rb#1207
650
+ def filter(bt); end
651
+
652
+ # The regular expression to use to filter backtraces. Defaults to +MT_RE+.
653
+ #
654
+ # source://minitest//lib/minitest.rb#1197
655
+ def regexp; end
656
+
657
+ # The regular expression to use to filter backtraces. Defaults to +MT_RE+.
658
+ #
659
+ # source://minitest//lib/minitest.rb#1197
660
+ def regexp=(_arg0); end
661
+ end
662
+
663
+ # source://minitest//lib/minitest.rb#1192
664
+ Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp)
665
+
666
+ # Dispatch to multiple reporters as one.
667
+ #
668
+ # source://minitest//lib/minitest.rb#984
669
+ class Minitest::CompositeReporter < ::Minitest::AbstractReporter
670
+ # @return [CompositeReporter] a new instance of CompositeReporter
671
+ #
672
+ # source://minitest//lib/minitest.rb#990
673
+ def initialize(*reporters); end
674
+
675
+ # Add another reporter to the mix.
676
+ #
677
+ # source://minitest//lib/minitest.rb#1002
678
+ def <<(reporter); end
679
+
680
+ # source://minitest//lib/minitest.rb#995
681
+ def io; end
682
+
683
+ # @return [Boolean]
684
+ #
685
+ # source://minitest//lib/minitest.rb#1006
686
+ def passed?; end
687
+
688
+ # source://minitest//lib/minitest.rb#1014
689
+ def prerecord(klass, name); end
690
+
691
+ # source://minitest//lib/minitest.rb#1021
692
+ def record(result); end
693
+
694
+ # source://minitest//lib/minitest.rb#1027
695
+ def report; end
696
+
697
+ # The list of reporters to dispatch to.
698
+ #
699
+ # source://minitest//lib/minitest.rb#988
700
+ def reporters; end
701
+
702
+ # The list of reporters to dispatch to.
703
+ #
704
+ # source://minitest//lib/minitest.rb#988
705
+ def reporters=(_arg0); end
706
+
707
+ # source://minitest//lib/minitest.rb#1010
708
+ def start; end
709
+ end
710
+
711
+ # Compresses backtraces.
712
+ #
713
+ # source://minitest//lib/minitest/compress.rb#5
714
+ module Minitest::Compress
715
+ # Takes a backtrace (array of strings) and compresses repeating
716
+ # cycles in it to make it more readable.
717
+ #
718
+ # source://minitest//lib/minitest/compress.rb#11
719
+ def compress(orig); end
720
+ end
721
+
722
+ # Provides a simple set of guards that you can use in your tests
723
+ # to skip execution if it is not applicable. These methods are
724
+ # mixed into Test as both instance and class methods so you
725
+ # can use them inside or outside of the test methods.
726
+ #
727
+ # def test_something_for_mri
728
+ # skip "bug 1234" if jruby?
729
+ # # ...
730
+ # end
731
+ #
732
+ # if windows? then
733
+ # # ... lots of test methods ...
734
+ # end
735
+ #
736
+ # source://minitest//lib/minitest.rb#1134
737
+ module Minitest::Guard
738
+ # Is this running on jruby?
739
+ #
740
+ # @return [Boolean]
741
+ #
742
+ # source://minitest//lib/minitest.rb#1139
743
+ def jruby?(platform = T.unsafe(nil)); end
744
+
745
+ # Is this running on maglev?
746
+ #
747
+ # @return [Boolean]
748
+ #
749
+ # source://minitest//lib/minitest.rb#1146
750
+ def maglev?(platform = T.unsafe(nil)); end
751
+
752
+ # Is this running on mri?
753
+ #
754
+ # @return [Boolean]
755
+ #
756
+ # source://minitest//lib/minitest.rb#1156
757
+ def mri?(platform = T.unsafe(nil)); end
758
+
759
+ # Is this running on macOS?
760
+ #
761
+ # @return [Boolean]
762
+ #
763
+ # source://minitest//lib/minitest.rb#1163
764
+ def osx?(platform = T.unsafe(nil)); end
765
+
766
+ # Is this running on rubinius?
767
+ #
768
+ # @return [Boolean]
769
+ #
770
+ # source://minitest//lib/minitest.rb#1170
771
+ def rubinius?(platform = T.unsafe(nil)); end
772
+
773
+ # Is this running on windows?
774
+ #
775
+ # @return [Boolean]
776
+ #
777
+ # source://minitest//lib/minitest.rb#1180
778
+ def windows?(platform = T.unsafe(nil)); end
779
+ end
780
+
781
+ # source://minitest//lib/minitest/parallel.rb#4
782
+ module Minitest::Parallel; end
783
+
784
+ # The engine used to run multiple tests in parallel.
785
+ #
786
+ # source://minitest//lib/minitest/parallel.rb#9
787
+ class Minitest::Parallel::Executor
788
+ # Create a parallel test executor of with +size+ workers.
789
+ #
790
+ # @return [Executor] a new instance of Executor
791
+ #
792
+ # source://minitest//lib/minitest/parallel.rb#19
793
+ def initialize(size); end
794
+
795
+ # Add a job to the queue
796
+ #
797
+ # source://minitest//lib/minitest/parallel.rb#45
798
+ def <<(work); end
799
+
800
+ # Shuts down the pool of workers by signalling them to quit and
801
+ # waiting for them all to finish what they're currently working
802
+ # on.
803
+ #
804
+ # source://minitest//lib/minitest/parallel.rb#52
805
+ def shutdown; end
806
+
807
+ # The size of the pool of workers.
808
+ #
809
+ # source://minitest//lib/minitest/parallel.rb#14
810
+ def size; end
811
+
812
+ # Start the executor
813
+ #
814
+ # source://minitest//lib/minitest/parallel.rb#28
815
+ def start; end
816
+ end
817
+
818
+ # source://minitest//lib/minitest/parallel.rb#58
819
+ module Minitest::Parallel::Test
820
+ # source://minitest//lib/minitest/parallel.rb#59
821
+ def _synchronize; end
822
+ end
823
+
824
+ # source://minitest//lib/minitest/parallel.rb#61
825
+ module Minitest::Parallel::Test::ClassMethods
826
+ # source://minitest//lib/minitest/parallel.rb#62
827
+ def run_one_method(klass, method_name, reporter); end
828
+
829
+ # source://minitest//lib/minitest/parallel.rb#66
830
+ def test_order; end
831
+ end
832
+
833
+ # A very simple reporter that prints the "dots" during the run.
834
+ #
835
+ # This is added to the top-level CompositeReporter at the start of
836
+ # the run. If you want to change the output of minitest via a
837
+ # plugin, pull this out of the composite and replace it with your
838
+ # own.
839
+ #
840
+ # source://minitest//lib/minitest.rb#774
841
+ class Minitest::ProgressReporter < ::Minitest::Reporter
842
+ # source://minitest//lib/minitest.rb#775
843
+ def prerecord(klass, name); end
844
+
845
+ # source://minitest//lib/minitest.rb#782
846
+ def record(result); end
847
+ end
848
+
849
+ # Shared code for anything that can get passed to a Reporter. See
850
+ # Minitest::Test & Minitest::Result.
851
+ #
852
+ # source://minitest//lib/minitest.rb#596
853
+ module Minitest::Reportable
854
+ # @raise [NotImplementedError]
855
+ #
856
+ # source://minitest//lib/minitest.rb#618
857
+ def class_name; end
858
+
859
+ # Did this run error?
860
+ #
861
+ # @return [Boolean]
862
+ #
863
+ # source://minitest//lib/minitest.rb#639
864
+ def error?; end
865
+
866
+ # The location identifier of this test. Depends on a method
867
+ # existing called class_name.
868
+ #
869
+ # source://minitest//lib/minitest.rb#613
870
+ def location; end
871
+
872
+ # Did this run pass?
873
+ #
874
+ # Note: skipped runs are not considered passing, but they don't
875
+ # cause the process to exit non-zero.
876
+ #
877
+ # @return [Boolean]
878
+ #
879
+ # source://minitest//lib/minitest.rb#603
880
+ def passed?; end
881
+
882
+ # Returns ".", "F", or "E" based on the result of the run.
883
+ #
884
+ # source://minitest//lib/minitest.rb#625
885
+ def result_code; end
886
+
887
+ # Was this run skipped?
888
+ #
889
+ # @return [Boolean]
890
+ #
891
+ # source://minitest//lib/minitest.rb#632
892
+ def skipped?; end
893
+ end
894
+
895
+ # source://minitest//lib/minitest.rb#607
896
+ Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String)
897
+
898
+ # AbstractReportera
899
+ #
900
+ # source://minitest//lib/minitest.rb#750
901
+ class Minitest::Reporter < ::Minitest::AbstractReporter
902
+ # @return [Reporter] a new instance of Reporter
903
+ #
904
+ # source://minitest//lib/minitest.rb#759
905
+ def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end
906
+
907
+ # The IO used to report.
908
+ #
909
+ # source://minitest//lib/minitest.rb#752
910
+ def io; end
911
+
912
+ # The IO used to report.
913
+ #
914
+ # source://minitest//lib/minitest.rb#752
915
+ def io=(_arg0); end
916
+
917
+ # Command-line options for this run.
918
+ #
919
+ # source://minitest//lib/minitest.rb#757
920
+ def options; end
921
+
922
+ # Command-line options for this run.
923
+ #
924
+ # source://minitest//lib/minitest.rb#757
925
+ def options=(_arg0); end
926
+ end
927
+
928
+ # This represents a test result in a clean way that can be
929
+ # marshalled over a wire. Tests can do anything they want to the
930
+ # test instance and can create conditions that cause Marshal.dump to
931
+ # blow up. By using Result.from(a_test) you can be reasonably sure
932
+ # that the test result can be marshalled.
933
+ #
934
+ # source://minitest//lib/minitest.rb#651
935
+ class Minitest::Result < ::Minitest::Runnable
936
+ include ::Minitest::Reportable
937
+
938
+ # source://minitest//lib/minitest.rb#685
939
+ def class_name; end
940
+
941
+ # The class name of the test result.
942
+ #
943
+ # source://minitest//lib/minitest.rb#660
944
+ def klass; end
945
+
946
+ # The class name of the test result.
947
+ #
948
+ # source://minitest//lib/minitest.rb#660
949
+ def klass=(_arg0); end
950
+
951
+ # The location of the test method.
952
+ #
953
+ # source://minitest//lib/minitest.rb#665
954
+ def source_location; end
955
+
956
+ # The location of the test method.
957
+ #
958
+ # source://minitest//lib/minitest.rb#665
959
+ def source_location=(_arg0); end
960
+
961
+ # source://minitest//lib/minitest.rb#689
962
+ def to_s; end
963
+
964
+ class << self
965
+ # Create a new test result from a Runnable instance.
966
+ #
967
+ # source://minitest//lib/minitest.rb#670
968
+ def from(runnable); end
969
+ end
970
+ end
971
+
972
+ # re-open
973
+ #
974
+ # source://minitest//lib/minitest.rb#363
975
+ class Minitest::Runnable
976
+ # @return [Runnable] a new instance of Runnable
977
+ #
978
+ # source://minitest//lib/minitest.rb#527
979
+ def initialize(name); end
980
+
981
+ # Number of assertions executed in this run.
982
+ #
983
+ # source://minitest//lib/minitest.rb#367
984
+ def assertions; end
985
+
986
+ # Number of assertions executed in this run.
987
+ #
988
+ # source://minitest//lib/minitest.rb#367
989
+ def assertions=(_arg0); end
990
+
991
+ # source://minitest//lib/minitest.rb#523
992
+ def failure; end
993
+
994
+ # An assertion raised during the run, if any.
995
+ #
996
+ # source://minitest//lib/minitest.rb#372
997
+ def failures; end
998
+
999
+ # An assertion raised during the run, if any.
1000
+ #
1001
+ # source://minitest//lib/minitest.rb#372
1002
+ def failures=(_arg0); end
1003
+
1004
+ # source://minitest//lib/minitest.rb#509
1005
+ def marshal_dump; end
1006
+
1007
+ # source://minitest//lib/minitest.rb#519
1008
+ def marshal_load(ary); end
1009
+
1010
+ # Metadata you attach to the test results that get sent to the reporter.
1011
+ #
1012
+ # Lazily initializes to a hash, to keep memory down.
1013
+ #
1014
+ # NOTE: this data *must* be plain (read: marshal-able) data!
1015
+ # Hashes! Arrays! Strings!
1016
+ #
1017
+ # source://minitest//lib/minitest.rb#542
1018
+ def metadata; end
1019
+
1020
+ # Sets metadata, mainly used for +Result.from+.
1021
+ #
1022
+ # source://minitest//lib/minitest.rb#549
1023
+ def metadata=(_arg0); end
1024
+
1025
+ # Returns true if metadata exists.
1026
+ #
1027
+ # @return [Boolean]
1028
+ #
1029
+ # source://minitest//lib/minitest.rb#554
1030
+ def metadata?; end
1031
+
1032
+ # Name of the run.
1033
+ #
1034
+ # source://minitest//lib/minitest.rb#390
1035
+ def name; end
1036
+
1037
+ # Set the name of the run.
1038
+ #
1039
+ # source://minitest//lib/minitest.rb#397
1040
+ def name=(o); end
1041
+
1042
+ # Did this run pass?
1043
+ #
1044
+ # Note: skipped runs are not considered passing, but they don't
1045
+ # cause the process to exit non-zero.
1046
+ #
1047
+ # @raise [NotImplementedError]
1048
+ # @return [Boolean]
1049
+ #
1050
+ # source://minitest//lib/minitest.rb#571
1051
+ def passed?; end
1052
+
1053
+ # Returns a single character string to print based on the result
1054
+ # of the run. One of <tt>"."</tt>, <tt>"F"</tt>,
1055
+ # <tt>"E"</tt> or <tt>"S"</tt>.
1056
+ #
1057
+ # @raise [NotImplementedError]
1058
+ #
1059
+ # source://minitest//lib/minitest.rb#580
1060
+ def result_code; end
1061
+
1062
+ # Runs a single method. Needs to return self.
1063
+ #
1064
+ # @raise [NotImplementedError]
1065
+ #
1066
+ # source://minitest//lib/minitest.rb#561
1067
+ def run; end
1068
+
1069
+ # Was this run skipped? See #passed? for more information.
1070
+ #
1071
+ # @raise [NotImplementedError]
1072
+ # @return [Boolean]
1073
+ #
1074
+ # source://minitest//lib/minitest.rb#587
1075
+ def skipped?; end
1076
+
1077
+ # The time it took to run.
1078
+ #
1079
+ # source://minitest//lib/minitest.rb#377
1080
+ def time; end
1081
+
1082
+ # The time it took to run.
1083
+ #
1084
+ # source://minitest//lib/minitest.rb#377
1085
+ def time=(_arg0); end
1086
+
1087
+ # source://minitest//lib/minitest.rb#379
1088
+ def time_it; end
1089
+
1090
+ class << self
1091
+ # source://minitest//lib/minitest.rb#1241
1092
+ def inherited(klass); end
1093
+
1094
+ # Returns all instance methods matching the pattern +re+.
1095
+ #
1096
+ # source://minitest//lib/minitest.rb#404
1097
+ def methods_matching(re); end
1098
+
1099
+ # source://minitest//lib/minitest.rb#479
1100
+ def on_signal(name, action); end
1101
+
1102
+ # source://minitest//lib/minitest.rb#408
1103
+ def reset; end
1104
+
1105
+ # Responsible for running all runnable methods in a given class,
1106
+ # each in its own instance. Each instance is passed to the
1107
+ # reporter to record.
1108
+ #
1109
+ # source://minitest//lib/minitest.rb#419
1110
+ def run(reporter, options = T.unsafe(nil)); end
1111
+
1112
+ # Runs a single method and has the reporter record the result.
1113
+ # This was considered internal API but is factored out of run so
1114
+ # that subclasses can specialize the running of an individual
1115
+ # test. See Minitest::ParallelTest::ClassMethods for an example.
1116
+ #
1117
+ # source://minitest//lib/minitest.rb#460
1118
+ def run_one_method(klass, method_name, reporter); end
1119
+
1120
+ # Each subclass of Runnable is responsible for overriding this
1121
+ # method to return all runnable methods. See #methods_matching.
1122
+ #
1123
+ # @raise [NotImplementedError]
1124
+ #
1125
+ # source://minitest//lib/minitest.rb#496
1126
+ def runnable_methods; end
1127
+
1128
+ # Returns all subclasses of Runnable.
1129
+ #
1130
+ # source://minitest//lib/minitest.rb#503
1131
+ def runnables; end
1132
+
1133
+ # Defines the order to run tests (:random by default). Override
1134
+ # this or use a convenience method to change it for your tests.
1135
+ #
1136
+ # source://minitest//lib/minitest.rb#469
1137
+ def test_order; end
1138
+
1139
+ # source://minitest//lib/minitest.rb#473
1140
+ def with_info_handler(reporter, &block); end
1141
+ end
1142
+ end
1143
+
1144
+ # source://minitest//lib/minitest.rb#477
1145
+ Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash)
1146
+
1147
+ # Assertion raised when skipping a run.
1148
+ #
1149
+ # source://minitest//lib/minitest.rb#1065
1150
+ class Minitest::Skip < ::Minitest::Assertion
1151
+ # source://minitest//lib/minitest.rb#1066
1152
+ def result_label; end
1153
+ end
1154
+
1155
+ # A reporter that gathers statistics about a test run. Does not do
1156
+ # any IO because meant to be used as a parent class for a reporter
1157
+ # that does.
1158
+ #
1159
+ # If you want to create an entirely different type of output (eg,
1160
+ # CI, HTML, etc), this is the place to start.
1161
+ #
1162
+ # Example:
1163
+ #
1164
+ # class JenkinsCIReporter < StatisticsReporter
1165
+ # def report
1166
+ # super # Needed to calculate some statistics
1167
+ #
1168
+ # print "<testsuite "
1169
+ # print "tests='#{count}' "
1170
+ # print "failures='#{failures}' "
1171
+ # # Remaining XML...
1172
+ # end
1173
+ # end
1174
+ #
1175
+ # source://minitest//lib/minitest.rb#810
1176
+ class Minitest::StatisticsReporter < ::Minitest::Reporter
1177
+ # @return [StatisticsReporter] a new instance of StatisticsReporter
1178
+ #
1179
+ # source://minitest//lib/minitest.rb#859
1180
+ def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end
1181
+
1182
+ # Total number of assertions.
1183
+ #
1184
+ # source://minitest//lib/minitest.rb#814
1185
+ def assertions; end
1186
+
1187
+ # Total number of assertions.
1188
+ #
1189
+ # source://minitest//lib/minitest.rb#814
1190
+ def assertions=(_arg0); end
1191
+
1192
+ # Total number of test cases.
1193
+ #
1194
+ # source://minitest//lib/minitest.rb#819
1195
+ def count; end
1196
+
1197
+ # Total number of test cases.
1198
+ #
1199
+ # source://minitest//lib/minitest.rb#819
1200
+ def count=(_arg0); end
1201
+
1202
+ # Total number of tests that erred.
1203
+ #
1204
+ # source://minitest//lib/minitest.rb#847
1205
+ def errors; end
1206
+
1207
+ # Total number of tests that erred.
1208
+ #
1209
+ # source://minitest//lib/minitest.rb#847
1210
+ def errors=(_arg0); end
1211
+
1212
+ # Total number of tests that failed.
1213
+ #
1214
+ # source://minitest//lib/minitest.rb#842
1215
+ def failures; end
1216
+
1217
+ # Total number of tests that failed.
1218
+ #
1219
+ # source://minitest//lib/minitest.rb#842
1220
+ def failures=(_arg0); end
1221
+
1222
+ # @return [Boolean]
1223
+ #
1224
+ # source://minitest//lib/minitest.rb#873
1225
+ def passed?; end
1226
+
1227
+ # source://minitest//lib/minitest.rb#881
1228
+ def record(result); end
1229
+
1230
+ # Report on the tracked statistics.
1231
+ #
1232
+ # source://minitest//lib/minitest.rb#891
1233
+ def report; end
1234
+
1235
+ # An +Array+ of test cases that failed or were skipped.
1236
+ #
1237
+ # source://minitest//lib/minitest.rb#824
1238
+ def results; end
1239
+
1240
+ # An +Array+ of test cases that failed or were skipped.
1241
+ #
1242
+ # source://minitest//lib/minitest.rb#824
1243
+ def results=(_arg0); end
1244
+
1245
+ # Total number of tests that where skipped.
1246
+ #
1247
+ # source://minitest//lib/minitest.rb#857
1248
+ def skips; end
1249
+
1250
+ # Total number of tests that where skipped.
1251
+ #
1252
+ # source://minitest//lib/minitest.rb#857
1253
+ def skips=(_arg0); end
1254
+
1255
+ # source://minitest//lib/minitest.rb#877
1256
+ def start; end
1257
+
1258
+ # Time the test run started. If available, the monotonic clock is
1259
+ # used and this is a +Float+, otherwise it's an instance of
1260
+ # +Time+.
1261
+ #
1262
+ # source://minitest//lib/minitest.rb#831
1263
+ def start_time; end
1264
+
1265
+ # Time the test run started. If available, the monotonic clock is
1266
+ # used and this is a +Float+, otherwise it's an instance of
1267
+ # +Time+.
1268
+ #
1269
+ # source://minitest//lib/minitest.rb#831
1270
+ def start_time=(_arg0); end
1271
+
1272
+ # Test run time. If available, the monotonic clock is used and
1273
+ # this is a +Float+, otherwise it's an instance of +Time+.
1274
+ #
1275
+ # source://minitest//lib/minitest.rb#837
1276
+ def total_time; end
1277
+
1278
+ # Test run time. If available, the monotonic clock is used and
1279
+ # this is a +Float+, otherwise it's an instance of +Time+.
1280
+ #
1281
+ # source://minitest//lib/minitest.rb#837
1282
+ def total_time=(_arg0); end
1283
+
1284
+ # Total number of tests that warned.
1285
+ #
1286
+ # source://minitest//lib/minitest.rb#852
1287
+ def warnings; end
1288
+
1289
+ # Total number of tests that warned.
1290
+ #
1291
+ # source://minitest//lib/minitest.rb#852
1292
+ def warnings=(_arg0); end
1293
+ end
1294
+
1295
+ # A reporter that prints the header, summary, and failure details at
1296
+ # the end of the run.
1297
+ #
1298
+ # This is added to the top-level CompositeReporter at the start of
1299
+ # the run. If you want to change the output of minitest via a
1300
+ # plugin, pull this out of the composite and replace it with your
1301
+ # own.
1302
+ #
1303
+ # source://minitest//lib/minitest.rb#912
1304
+ class Minitest::SummaryReporter < ::Minitest::StatisticsReporter
1305
+ # source://minitest//lib/minitest.rb#945
1306
+ def aggregated_results(io); end
1307
+
1308
+ # source://minitest//lib/minitest.rb#914
1309
+ def old_sync; end
1310
+
1311
+ # source://minitest//lib/minitest.rb#914
1312
+ def old_sync=(_arg0); end
1313
+
1314
+ # source://minitest//lib/minitest.rb#928
1315
+ def report; end
1316
+
1317
+ # source://minitest//lib/minitest.rb#916
1318
+ def start; end
1319
+
1320
+ # source://minitest//lib/minitest.rb#940
1321
+ def statistics; end
1322
+
1323
+ # source://minitest//lib/minitest.rb#965
1324
+ def summary; end
1325
+
1326
+ # source://minitest//lib/minitest.rb#913
1327
+ def sync; end
1328
+
1329
+ # source://minitest//lib/minitest.rb#913
1330
+ def sync=(_arg0); end
1331
+
1332
+ # source://minitest//lib/minitest.rb#961
1333
+ def to_s; end
1334
+ end
1335
+
1336
+ # Subclass Test to create your own tests. Typically you'll want a
1337
+ # Test subclass per implementation class.
1338
+ #
1339
+ # See Minitest::Assertions
1340
+ #
1341
+ # source://minitest//lib/minitest/test.rb#10
1342
+ class Minitest::Test < ::Minitest::Runnable
1343
+ include ::Minitest::Reportable
1344
+ include ::Minitest::Assertions
1345
+ include ::Minitest::Test::LifecycleHooks
1346
+ include ::Minitest::Guard
1347
+ extend ::Minitest::Guard
1348
+
1349
+ # LifecycleHooks
1350
+ #
1351
+ # source://minitest//lib/minitest/test.rb#190
1352
+ def capture_exceptions; end
1353
+
1354
+ # source://minitest//lib/minitest/test.rb#15
1355
+ def class_name; end
1356
+
1357
+ # source://minitest//lib/minitest/test.rb#207
1358
+ def neuter_exception(e); end
1359
+
1360
+ # source://minitest//lib/minitest/test.rb#218
1361
+ def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end
1362
+
1363
+ # Runs a single test with setup/teardown hooks.
1364
+ #
1365
+ # source://minitest//lib/minitest/test.rb#88
1366
+ def run; end
1367
+
1368
+ # source://minitest//lib/minitest/test.rb#200
1369
+ def sanitize_exception(e); end
1370
+
1371
+ class << self
1372
+ # Call this at the top of your tests when you absolutely
1373
+ # positively need to have ordered tests. In doing so, you're
1374
+ # admitting that you suck and your tests are weak.
1375
+ #
1376
+ # source://minitest//lib/minitest/test.rb#35
1377
+ def i_suck_and_my_tests_are_order_dependent!; end
1378
+
1379
+ # Returns the value of attribute io_lock.
1380
+ #
1381
+ # source://minitest//lib/minitest/test.rb#26
1382
+ def io_lock; end
1383
+
1384
+ # Sets the attribute io_lock
1385
+ #
1386
+ # @param value the value to set the attribute io_lock to.
1387
+ #
1388
+ # source://minitest//lib/minitest/test.rb#26
1389
+ def io_lock=(_arg0); end
1390
+
1391
+ # Make diffs for this Test use #pretty_inspect so that diff
1392
+ # in assert_equal can have more details. NOTE: this is much slower
1393
+ # than the regular inspect but much more usable for complex
1394
+ # objects.
1395
+ #
1396
+ # source://minitest//lib/minitest/test.rb#48
1397
+ def make_my_diffs_pretty!; end
1398
+
1399
+ # Call this at the top of your tests (inside the +Minitest::Test+
1400
+ # subclass or +describe+ block) when you want to run your tests in
1401
+ # parallel. In doing so, you're admitting that you rule and your
1402
+ # tests are awesome.
1403
+ #
1404
+ # source://minitest//lib/minitest/test.rb#60
1405
+ def parallelize_me!; end
1406
+
1407
+ # Returns all instance methods starting with "test_". Based on
1408
+ # #test_order, the methods are either sorted, randomized
1409
+ # (default), or run in parallel.
1410
+ #
1411
+ # source://minitest//lib/minitest/test.rb#71
1412
+ def runnable_methods; end
1413
+ end
1414
+ end
1415
+
1416
+ # Provides before/after hooks for setup and teardown. These are
1417
+ # meant for library writers, NOT for regular test authors. See
1418
+ # #before_setup for an example.
1419
+ #
1420
+ # source://minitest//lib/minitest/test.rb#113
1421
+ module Minitest::Test::LifecycleHooks
1422
+ # Runs before every test, after setup. This hook is meant for
1423
+ # libraries to extend minitest. It is not meant to be used by
1424
+ # test developers.
1425
+ #
1426
+ # See #before_setup for an example.
1427
+ #
1428
+ # source://minitest//lib/minitest/test.rb#163
1429
+ def after_setup; end
1430
+
1431
+ # Runs after every test, after teardown. This hook is meant for
1432
+ # libraries to extend minitest. It is not meant to be used by
1433
+ # test developers.
1434
+ #
1435
+ # See #before_setup for an example.
1436
+ #
1437
+ # source://minitest//lib/minitest/test.rb#187
1438
+ def after_teardown; end
1439
+
1440
+ # Runs before every test, before setup. This hook is meant for
1441
+ # libraries to extend minitest. It is not meant to be used by
1442
+ # test developers.
1443
+ #
1444
+ # As a simplistic example:
1445
+ #
1446
+ # module MyMinitestPlugin
1447
+ # def before_setup
1448
+ # super
1449
+ # # ... stuff to do before setup is run
1450
+ # end
1451
+ #
1452
+ # def after_setup
1453
+ # # ... stuff to do after setup is run
1454
+ # super
1455
+ # end
1456
+ #
1457
+ # def before_teardown
1458
+ # super
1459
+ # # ... stuff to do before teardown is run
1460
+ # end
1461
+ #
1462
+ # def after_teardown
1463
+ # # ... stuff to do after teardown is run
1464
+ # super
1465
+ # end
1466
+ # end
1467
+ #
1468
+ # class Minitest::Test
1469
+ # include MyMinitestPlugin
1470
+ # end
1471
+ #
1472
+ # source://minitest//lib/minitest/test.rb#148
1473
+ def before_setup; end
1474
+
1475
+ # Runs after every test, before teardown. This hook is meant for
1476
+ # libraries to extend minitest. It is not meant to be used by
1477
+ # test developers.
1478
+ #
1479
+ # See #before_setup for an example.
1480
+ #
1481
+ # source://minitest//lib/minitest/test.rb#172
1482
+ def before_teardown; end
1483
+
1484
+ # Runs before every test. Use this to set up before each test
1485
+ # run.
1486
+ #
1487
+ # source://minitest//lib/minitest/test.rb#154
1488
+ def setup; end
1489
+
1490
+ # Runs after every test. Use this to clean up after each test
1491
+ # run.
1492
+ #
1493
+ # source://minitest//lib/minitest/test.rb#178
1494
+ def teardown; end
1495
+ end
1496
+
1497
+ # source://minitest//lib/minitest/test.rb#19
1498
+ Minitest::Test::PASSTHROUGH_EXCEPTIONS = T.let(T.unsafe(nil), Array)
1499
+
1500
+ # source://minitest//lib/minitest/test.rb#21
1501
+ Minitest::Test::SETUP_METHODS = T.let(T.unsafe(nil), Array)
1502
+
1503
+ # source://minitest//lib/minitest/test.rb#23
1504
+ Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array)
1505
+
1506
+ # Assertion wrapping an unexpected error that was raised during a run.
1507
+ #
1508
+ # source://minitest//lib/minitest.rb#1074
1509
+ class Minitest::UnexpectedError < ::Minitest::Assertion
1510
+ include ::Minitest::Compress
1511
+
1512
+ # @return [UnexpectedError] a new instance of UnexpectedError
1513
+ #
1514
+ # source://minitest//lib/minitest.rb#1080
1515
+ def initialize(error); end
1516
+
1517
+ # source://minitest//lib/minitest.rb#1093
1518
+ def backtrace; end
1519
+
1520
+ # TODO: figure out how to use `cause` instead
1521
+ #
1522
+ # source://minitest//lib/minitest.rb#1078
1523
+ def error; end
1524
+
1525
+ # TODO: figure out how to use `cause` instead
1526
+ #
1527
+ # source://minitest//lib/minitest.rb#1078
1528
+ def error=(_arg0); end
1529
+
1530
+ # source://minitest//lib/minitest.rb#1099
1531
+ def message; end
1532
+
1533
+ # source://minitest//lib/minitest.rb#1105
1534
+ def result_label; end
1535
+ end
1536
+
1537
+ # source://minitest//lib/minitest.rb#1097
1538
+ Minitest::UnexpectedError::BASE_RE = T.let(T.unsafe(nil), Regexp)
1539
+
1540
+ # Assertion raised on warning when running in -Werror mode.
1541
+ #
1542
+ # source://minitest//lib/minitest.rb#1113
1543
+ class Minitest::UnexpectedWarning < ::Minitest::Assertion
1544
+ # source://minitest//lib/minitest.rb#1114
1545
+ def result_label; end
1546
+ end
1547
+
1548
+ # source://minitest//lib/minitest.rb#13
1549
+ Minitest::VERSION = T.let(T.unsafe(nil), String)