activerecord-ejection_seat 0.2.0 → 0.3.0

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +11 -8
  3. data/.ruby-version +1 -0
  4. data/.tool-versions +1 -0
  5. data/Gemfile +2 -2
  6. data/Gemfile.lock +42 -55
  7. data/README.md +16 -6
  8. data/Rakefile +6 -6
  9. data/activerecord-ejection_seat.gemspec +40 -0
  10. data/lib/activerecord-ejection_seat/attributes_builder.rb +42 -0
  11. data/lib/activerecord-ejection_seat/ejectable.rb +7 -10
  12. data/lib/activerecord-ejection_seat/props_builder.rb +35 -23
  13. data/lib/activerecord-ejection_seat/version.rb +2 -2
  14. data/lib/activerecord-ejection_seat.rb +6 -3
  15. data/sorbet/rbi/gems/activemodel@7.0.4.1.rbi +6022 -0
  16. data/sorbet/rbi/gems/activerecord@7.0.4.1.rbi +37791 -0
  17. data/sorbet/rbi/gems/activesupport@7.0.4.1.rbi +18127 -0
  18. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +11626 -2
  19. data/sorbet/rbi/gems/minitest@5.17.0.rbi +2319 -0
  20. data/sorbet/rbi/gems/{parser@3.1.3.0.rbi → parser@3.2.0.0.rbi} +907 -821
  21. data/sorbet/rbi/gems/{prettier_print@1.1.0.rbi → prettier_print@1.2.0.rbi} +0 -0
  22. data/sorbet/rbi/gems/{rubocop-ast@1.24.0.rbi → rubocop-ast@1.24.1.rbi} +702 -458
  23. data/sorbet/rbi/gems/rubocop-minitest@0.26.1.rbi +2320 -0
  24. data/sorbet/rbi/gems/{rubocop@1.41.0.rbi → rubocop@1.43.0.rbi} +2743 -625
  25. data/sorbet/rbi/gems/{ruby-lsp@0.3.7.rbi → ruby-lsp@0.3.8.rbi} +2 -1
  26. data/sorbet/rbi/gems/{sqlite3@1.5.4.rbi → sqlite3@1.6.0.rbi} +73 -0
  27. data/sorbet/rbi/gems/{syntax_tree@4.3.0.rbi → syntax_tree@5.2.0.rbi} +0 -0
  28. data/sorbet/rbi/gems/{tapioca@0.10.4.rbi → tapioca@0.10.5.rbi} +279 -96
  29. data/sorbet/rbi/gems/{unicode-display_width@2.3.0.rbi → unicode-display_width@2.4.2.rbi} +26 -7
  30. data/sorbet/rbi/gems/{unparser@0.6.5.rbi → unparser@0.6.7.rbi} +323 -64
  31. data/sorbet/rbi/gems/{yard-sorbet@0.7.0.rbi → yard-sorbet@0.8.0.rbi} +91 -41
  32. data/sorbet/rbi/shims/location.rbi +13 -0
  33. data/sorbet/rbi/shims/post.rbi +16 -0
  34. data/sorbet/rbi/shims/user.rbi +19 -0
  35. data/sorbet/rbi/todo.rbi +0 -4
  36. data/sorbet/tapioca/require.rb +16 -2
  37. metadata +29 -27
  38. data/sorbet/rbi/gems/activemodel@7.0.4.rbi +0 -8
  39. data/sorbet/rbi/gems/activerecord@7.0.4.rbi +0 -11
  40. data/sorbet/rbi/gems/activesupport@7.0.4.rbi +0 -93
  41. data/sorbet/rbi/gems/minitest@5.16.3.rbi +0 -8
  42. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +0 -10588
  43. data/sorbet/rbi/gems/rspec-expectations@3.12.1.rbi +0 -7817
  44. data/sorbet/rbi/gems/rspec-mocks@3.12.1.rbi +0 -4994
  45. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +0 -1477
  46. data/sorbet/rbi/gems/rspec@3.12.0.rbi +0 -10
  47. data/sorbet/rbi/gems/rubocop-rspec@2.16.0.rbi +0 -7650
@@ -0,0 +1,2319 @@
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
+ # source://yard/0.9.28/lib/yard.rb#61
8
+ ::RUBY18 = T.let(T.unsafe(nil), FalseClass)
9
+
10
+ # source://yard/0.9.28/lib/yard.rb#62
11
+ ::RUBY19 = T.let(T.unsafe(nil), TrueClass)
12
+
13
+ # source://minitest//lib/minitest/test_task.rb#292
14
+ class Integer < ::Numeric
15
+ # source://minitest//lib/minitest/test_task.rb#293
16
+ def threads_do(jobs); end
17
+ end
18
+
19
+ Integer::GMP_VERSION = T.let(T.unsafe(nil), String)
20
+
21
+ # Kernel extensions for minitest
22
+ #
23
+ # source://minitest//lib/minitest/spec.rb#46
24
+ module Kernel
25
+ private
26
+
27
+ # Describe a series of expectations for a given target +desc+.
28
+ #
29
+ # Defines a test class subclassing from either Minitest::Spec or
30
+ # from the surrounding describe's class. The surrounding class may
31
+ # subclass Minitest::Spec manually in order to easily share code:
32
+ #
33
+ # class MySpec < Minitest::Spec
34
+ # # ... shared code ...
35
+ # end
36
+ #
37
+ # class TestStuff < MySpec
38
+ # it "does stuff" do
39
+ # # shared code available here
40
+ # end
41
+ # describe "inner stuff" do
42
+ # it "still does stuff" do
43
+ # # ...and here
44
+ # end
45
+ # end
46
+ # end
47
+ #
48
+ # For more information on getting started with writing specs, see:
49
+ #
50
+ # http://www.rubyinside.com/a-minitestspec-tutorial-elegant-spec-style-testing-that-comes-with-ruby-5354.html
51
+ #
52
+ # For some suggestions on how to improve your specs, try:
53
+ #
54
+ # https://betterspecs.org
55
+ #
56
+ # but do note that several items there are debatable or specific to
57
+ # rspec.
58
+ #
59
+ # For more information about expectations, see Minitest::Expectations.
60
+ #
61
+ # source://minitest//lib/minitest/spec.rb#82
62
+ def describe(desc, *additional_desc, &block); end
63
+ end
64
+
65
+ # :include: README.rdoc
66
+ #
67
+ # source://minitest//lib/minitest/parallel.rb#1
68
+ module Minitest
69
+ class << self
70
+ # Internal run method. Responsible for telling all Runnable
71
+ # sub-classes to run.
72
+ #
73
+ # source://minitest//lib/minitest.rb#173
74
+ def __run(reporter, options); end
75
+
76
+ # A simple hook allowing you to run a block of code after everything
77
+ # is done running. Eg:
78
+ #
79
+ # Minitest.after_run { p $debugging_info }
80
+ #
81
+ # source://minitest//lib/minitest.rb#94
82
+ def after_run(&block); end
83
+
84
+ # Registers Minitest to run at process exit
85
+ #
86
+ # source://minitest//lib/minitest.rb#66
87
+ def autorun; end
88
+
89
+ # source://minitest//lib/minitest.rb#19
90
+ def backtrace_filter; end
91
+
92
+ # source://minitest//lib/minitest.rb#19
93
+ def backtrace_filter=(_arg0); end
94
+
95
+ # source://minitest//lib/minitest.rb#18
96
+ def cattr_accessor(name); end
97
+
98
+ # source://minitest//lib/minitest.rb#1059
99
+ def clock_time; end
100
+
101
+ # source://minitest//lib/minitest.rb#19
102
+ def extensions; end
103
+
104
+ # source://minitest//lib/minitest.rb#19
105
+ def extensions=(_arg0); end
106
+
107
+ # source://minitest//lib/minitest.rb#264
108
+ def filter_backtrace(bt); end
109
+
110
+ # source://minitest//lib/minitest.rb#19
111
+ def info_signal; end
112
+
113
+ # source://minitest//lib/minitest.rb#19
114
+ def info_signal=(_arg0); end
115
+
116
+ # source://minitest//lib/minitest.rb#98
117
+ def init_plugins(options); end
118
+
119
+ # source://minitest//lib/minitest.rb#105
120
+ def load_plugins; end
121
+
122
+ # source://minitest//lib/minitest.rb#19
123
+ def parallel_executor; end
124
+
125
+ # source://minitest//lib/minitest.rb#19
126
+ def parallel_executor=(_arg0); end
127
+
128
+ # source://minitest//lib/minitest.rb#186
129
+ def process_args(args = T.unsafe(nil)); end
130
+
131
+ # source://minitest//lib/minitest.rb#19
132
+ def reporter; end
133
+
134
+ # source://minitest//lib/minitest.rb#19
135
+ def reporter=(_arg0); end
136
+
137
+ # This is the top-level run method. Everything starts from here. It
138
+ # tells each Runnable sub-class to run, and each of those are
139
+ # responsible for doing whatever they do.
140
+ #
141
+ # The overall structure of a run looks like this:
142
+ #
143
+ # Minitest.autorun
144
+ # Minitest.run(args)
145
+ # Minitest.__run(reporter, options)
146
+ # Runnable.runnables.each
147
+ # runnable.run(reporter, options)
148
+ # self.runnable_methods.each
149
+ # self.run_one_method(self, runnable_method, reporter)
150
+ # Minitest.run_one_method(klass, runnable_method)
151
+ # klass.new(runnable_method).run
152
+ #
153
+ # source://minitest//lib/minitest.rb#140
154
+ def run(args = T.unsafe(nil)); end
155
+
156
+ # source://minitest//lib/minitest.rb#1050
157
+ def run_one_method(klass, method_name); end
158
+
159
+ # source://minitest//lib/minitest.rb#19
160
+ def seed; end
161
+
162
+ # source://minitest//lib/minitest.rb#19
163
+ def seed=(_arg0); end
164
+ end
165
+ end
166
+
167
+ # Defines the API for Reporters. Subclass this and override whatever
168
+ # you want. Go nuts.
169
+ #
170
+ # source://minitest//lib/minitest.rb#578
171
+ class Minitest::AbstractReporter
172
+ include ::Mutex_m
173
+
174
+ # source://mutex_m/0.1.2/mutex_m.rb#93
175
+ def lock; end
176
+
177
+ # source://mutex_m/0.1.2/mutex_m.rb#83
178
+ def locked?; end
179
+
180
+ # Did this run pass?
181
+ #
182
+ # @return [Boolean]
183
+ #
184
+ # source://minitest//lib/minitest.rb#612
185
+ def passed?; end
186
+
187
+ # About to start running a test. This allows a reporter to show
188
+ # that it is starting or that we are in the middle of a test run.
189
+ #
190
+ # source://minitest//lib/minitest.rb#591
191
+ def prerecord(klass, name); end
192
+
193
+ # Output and record the result of the test. Call
194
+ # {result#result_code}[rdoc-ref:Runnable#result_code] to get the
195
+ # result character string. Stores the result of the run if the run
196
+ # did not pass.
197
+ #
198
+ # source://minitest//lib/minitest.rb#600
199
+ def record(result); end
200
+
201
+ # Outputs the summary of the run.
202
+ #
203
+ # source://minitest//lib/minitest.rb#606
204
+ def report; end
205
+
206
+ # Starts reporting on the run.
207
+ #
208
+ # source://minitest//lib/minitest.rb#584
209
+ def start; end
210
+
211
+ # source://mutex_m/0.1.2/mutex_m.rb#78
212
+ def synchronize(&block); end
213
+
214
+ # source://mutex_m/0.1.2/mutex_m.rb#88
215
+ def try_lock; end
216
+
217
+ # source://mutex_m/0.1.2/mutex_m.rb#98
218
+ def unlock; end
219
+ end
220
+
221
+ # Represents run failures.
222
+ #
223
+ # source://minitest//lib/minitest.rb#895
224
+ class Minitest::Assertion < ::Exception
225
+ # source://minitest//lib/minitest.rb#896
226
+ def error; end
227
+
228
+ # Where was this run before an assertion was raised?
229
+ #
230
+ # source://minitest//lib/minitest.rb#903
231
+ def location; end
232
+
233
+ # source://minitest//lib/minitest.rb#912
234
+ def result_code; end
235
+
236
+ # source://minitest//lib/minitest.rb#916
237
+ def result_label; end
238
+ end
239
+
240
+ # Minitest Assertions. All assertion methods accept a +msg+ which is
241
+ # printed if the assertion fails.
242
+ #
243
+ # Protocol: Nearly everything here boils up to +assert+, which
244
+ # expects to be able to increment an instance accessor named
245
+ # +assertions+. This is not provided by Assertions and must be
246
+ # provided by the thing including Assertions. See Minitest::Runnable
247
+ # for an example.
248
+ #
249
+ # source://minitest//lib/minitest/assertions.rb#18
250
+ module Minitest::Assertions
251
+ # source://minitest//lib/minitest/assertions.rb#188
252
+ def _synchronize; end
253
+
254
+ # Fails unless +test+ is truthy.
255
+ #
256
+ # source://minitest//lib/minitest/assertions.rb#178
257
+ def assert(test, msg = T.unsafe(nil)); end
258
+
259
+ # Fails unless +obj+ is empty.
260
+ #
261
+ # source://minitest//lib/minitest/assertions.rb#195
262
+ def assert_empty(obj, msg = T.unsafe(nil)); end
263
+
264
+ # Fails unless <tt>exp == act</tt> printing the difference between
265
+ # the two, if possible.
266
+ #
267
+ # If there is no visible difference but the assertion fails, you
268
+ # should suspect that your #== is buggy, or your inspect output is
269
+ # missing crucial details. For nicer structural diffing, set
270
+ # Minitest::Test.make_my_diffs_pretty!
271
+ #
272
+ # For floats use assert_in_delta.
273
+ #
274
+ # See also: Minitest::Assertions.diff
275
+ #
276
+ # source://minitest//lib/minitest/assertions.rb#216
277
+ def assert_equal(exp, act, msg = T.unsafe(nil)); end
278
+
279
+ # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+
280
+ # of each other.
281
+ #
282
+ # assert_in_delta Math::PI, (22.0 / 7.0), 0.01
283
+ #
284
+ # source://minitest//lib/minitest/assertions.rb#240
285
+ def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
286
+
287
+ # For comparing Floats. Fails unless +exp+ and +act+ have a relative
288
+ # error less than +epsilon+.
289
+ #
290
+ # source://minitest//lib/minitest/assertions.rb#252
291
+ def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
292
+
293
+ # Fails unless +collection+ includes +obj+.
294
+ #
295
+ # source://minitest//lib/minitest/assertions.rb#259
296
+ def assert_includes(collection, obj, msg = T.unsafe(nil)); end
297
+
298
+ # Fails unless +obj+ is an instance of +cls+.
299
+ #
300
+ # source://minitest//lib/minitest/assertions.rb#270
301
+ def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end
302
+
303
+ # Fails unless +obj+ is a kind of +cls+.
304
+ #
305
+ # source://minitest//lib/minitest/assertions.rb#281
306
+ def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end
307
+
308
+ # Fails unless +matcher+ <tt>=~</tt> +obj+.
309
+ #
310
+ # source://minitest//lib/minitest/assertions.rb#291
311
+ def assert_match(matcher, obj, msg = T.unsafe(nil)); end
312
+
313
+ # Assert that the mock verifies correctly.
314
+ #
315
+ # source://minitest//lib/minitest/mock.rb#248
316
+ def assert_mock(mock); end
317
+
318
+ # Fails unless +obj+ is nil
319
+ #
320
+ # source://minitest//lib/minitest/assertions.rb#303
321
+ def assert_nil(obj, msg = T.unsafe(nil)); end
322
+
323
+ # For testing with binary operators. Eg:
324
+ #
325
+ # assert_operator 5, :<=, 4
326
+ #
327
+ # source://minitest//lib/minitest/assertions.rb#313
328
+ def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
329
+
330
+ # Fails if stdout or stderr do not output the expected results.
331
+ # Pass in nil if you don't care about that streams output. Pass in
332
+ # "" if you require it to be silent. Pass in a regexp if you want
333
+ # to pattern match.
334
+ #
335
+ # assert_output(/hey/) { method_with_output }
336
+ #
337
+ # NOTE: this uses #capture_io, not #capture_subprocess_io.
338
+ #
339
+ # See also: #assert_silent
340
+ #
341
+ # source://minitest//lib/minitest/assertions.rb#331
342
+ def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end
343
+
344
+ # Fails unless +path+ exists.
345
+ #
346
+ # source://minitest//lib/minitest/assertions.rb#355
347
+ def assert_path_exists(path, msg = T.unsafe(nil)); end
348
+
349
+ # For testing with predicates. Eg:
350
+ #
351
+ # assert_predicate str, :empty?
352
+ #
353
+ # This is really meant for specs and is front-ended by assert_operator:
354
+ #
355
+ # str.must_be :empty?
356
+ #
357
+ # source://minitest//lib/minitest/assertions.rb#369
358
+ def assert_predicate(o1, op, msg = T.unsafe(nil)); end
359
+
360
+ # Fails unless the block raises one of +exp+. Returns the
361
+ # exception matched so you can check the message, attributes, etc.
362
+ #
363
+ # +exp+ takes an optional message on the end to help explain
364
+ # failures and defaults to StandardError if no exception class is
365
+ # passed. Eg:
366
+ #
367
+ # assert_raises(CustomError) { method_with_custom_error }
368
+ #
369
+ # With custom error message:
370
+ #
371
+ # assert_raises(CustomError, 'This should have raised CustomError') { method_with_custom_error }
372
+ #
373
+ # Using the returned object:
374
+ #
375
+ # error = assert_raises(CustomError) do
376
+ # raise CustomError, 'This is really bad'
377
+ # end
378
+ #
379
+ # assert_equal 'This is really bad', error.message
380
+ #
381
+ # source://minitest//lib/minitest/assertions.rb#396
382
+ def assert_raises(*exp); end
383
+
384
+ # Fails unless +obj+ responds to +meth+.
385
+ #
386
+ # source://minitest//lib/minitest/assertions.rb#427
387
+ def assert_respond_to(obj, meth, msg = T.unsafe(nil)); end
388
+
389
+ # Fails unless +exp+ and +act+ are #equal?
390
+ #
391
+ # source://minitest//lib/minitest/assertions.rb#437
392
+ def assert_same(exp, act, msg = T.unsafe(nil)); end
393
+
394
+ # +send_ary+ is a receiver, message and arguments.
395
+ #
396
+ # Fails unless the call returns a true value
397
+ #
398
+ # source://minitest//lib/minitest/assertions.rb#450
399
+ def assert_send(send_ary, m = T.unsafe(nil)); end
400
+
401
+ # Fails if the block outputs anything to stderr or stdout.
402
+ #
403
+ # See also: #assert_output
404
+ #
405
+ # source://minitest//lib/minitest/assertions.rb#466
406
+ def assert_silent; end
407
+
408
+ # Fails unless the block throws +sym+
409
+ #
410
+ # source://minitest//lib/minitest/assertions.rb#475
411
+ def assert_throws(sym, msg = T.unsafe(nil)); end
412
+
413
+ # Captures $stdout and $stderr into strings:
414
+ #
415
+ # out, err = capture_io do
416
+ # puts "Some info"
417
+ # warn "You did a bad thing"
418
+ # end
419
+ #
420
+ # assert_match %r%info%, out
421
+ # assert_match %r%bad%, err
422
+ #
423
+ # NOTE: For efficiency, this method uses StringIO and does not
424
+ # capture IO for subprocesses. Use #capture_subprocess_io for
425
+ # that.
426
+ #
427
+ # source://minitest//lib/minitest/assertions.rb#516
428
+ def capture_io; end
429
+
430
+ # Captures $stdout and $stderr into strings, using Tempfile to
431
+ # ensure that subprocess IO is captured as well.
432
+ #
433
+ # out, err = capture_subprocess_io do
434
+ # system "echo Some info"
435
+ # system "echo You did a bad thing 1>&2"
436
+ # end
437
+ #
438
+ # assert_match %r%info%, out
439
+ # assert_match %r%bad%, err
440
+ #
441
+ # NOTE: This method is approximately 10x slower than #capture_io so
442
+ # only use it when you need to test the output of a subprocess.
443
+ #
444
+ # source://minitest//lib/minitest/assertions.rb#549
445
+ def capture_subprocess_io; end
446
+
447
+ # Returns a diff between +exp+ and +act+. If there is no known
448
+ # diff command or if it doesn't make sense to diff the output
449
+ # (single line, short output), then it simply returns a basic
450
+ # comparison between the two.
451
+ #
452
+ # See +things_to_diff+ for more info.
453
+ #
454
+ # source://minitest//lib/minitest/assertions.rb#59
455
+ def diff(exp, act); end
456
+
457
+ # Returns details for exception +e+
458
+ #
459
+ # source://minitest//lib/minitest/assertions.rb#581
460
+ def exception_details(e, msg); end
461
+
462
+ # Fails after a given date (in the local time zone). This allows
463
+ # you to put time-bombs in your tests if you need to keep
464
+ # something around until a later date lest you forget about it.
465
+ #
466
+ # source://minitest//lib/minitest/assertions.rb#597
467
+ def fail_after(y, m, d, msg); end
468
+
469
+ # Fails with +msg+.
470
+ #
471
+ # source://minitest//lib/minitest/assertions.rb#604
472
+ def flunk(msg = T.unsafe(nil)); end
473
+
474
+ # Returns a proc that will output +msg+ along with the default message.
475
+ #
476
+ # source://minitest//lib/minitest/assertions.rb#612
477
+ def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end
478
+
479
+ # This returns a human-readable version of +obj+. By default
480
+ # #inspect is called. You can override this to use #pretty_inspect
481
+ # if you want.
482
+ #
483
+ # See Minitest::Test.make_my_diffs_pretty!
484
+ #
485
+ # source://minitest//lib/minitest/assertions.rb#129
486
+ def mu_pp(obj); end
487
+
488
+ # This returns a diff-able more human-readable version of +obj+.
489
+ # This differs from the regular mu_pp because it expands escaped
490
+ # newlines and makes hex-values (like object_ids) generic. This
491
+ # uses mu_pp to do the first pass and then cleans it up.
492
+ #
493
+ # source://minitest//lib/minitest/assertions.rb#152
494
+ def mu_pp_for_diff(obj); end
495
+
496
+ # used for counting assertions
497
+ #
498
+ # source://minitest//lib/minitest/assertions.rb#623
499
+ def pass(_msg = T.unsafe(nil)); end
500
+
501
+ # Fails if +test+ is truthy.
502
+ #
503
+ # source://minitest//lib/minitest/assertions.rb#630
504
+ def refute(test, msg = T.unsafe(nil)); end
505
+
506
+ # Fails if +obj+ is empty.
507
+ #
508
+ # source://minitest//lib/minitest/assertions.rb#638
509
+ def refute_empty(obj, msg = T.unsafe(nil)); end
510
+
511
+ # Fails if <tt>exp == act</tt>.
512
+ #
513
+ # For floats use refute_in_delta.
514
+ #
515
+ # source://minitest//lib/minitest/assertions.rb#649
516
+ def refute_equal(exp, act, msg = T.unsafe(nil)); end
517
+
518
+ # For comparing Floats. Fails if +exp+ is within +delta+ of +act+.
519
+ #
520
+ # refute_in_delta Math::PI, (22.0 / 7.0)
521
+ #
522
+ # source://minitest//lib/minitest/assertions.rb#661
523
+ def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
524
+
525
+ # For comparing Floats. Fails if +exp+ and +act+ have a relative error
526
+ # less than +epsilon+.
527
+ #
528
+ # source://minitest//lib/minitest/assertions.rb#673
529
+ def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
530
+
531
+ # Fails if +collection+ includes +obj+.
532
+ #
533
+ # source://minitest//lib/minitest/assertions.rb#680
534
+ def refute_includes(collection, obj, msg = T.unsafe(nil)); end
535
+
536
+ # Fails if +obj+ is an instance of +cls+.
537
+ #
538
+ # source://minitest//lib/minitest/assertions.rb#691
539
+ def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end
540
+
541
+ # Fails if +obj+ is a kind of +cls+.
542
+ #
543
+ # source://minitest//lib/minitest/assertions.rb#701
544
+ def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end
545
+
546
+ # Fails if +matcher+ <tt>=~</tt> +obj+.
547
+ #
548
+ # source://minitest//lib/minitest/assertions.rb#709
549
+ def refute_match(matcher, obj, msg = T.unsafe(nil)); end
550
+
551
+ # Fails if +obj+ is nil.
552
+ #
553
+ # source://minitest//lib/minitest/assertions.rb#719
554
+ def refute_nil(obj, msg = T.unsafe(nil)); end
555
+
556
+ # Fails if +o1+ is not +op+ +o2+. Eg:
557
+ #
558
+ # refute_operator 1, :>, 2 #=> pass
559
+ # refute_operator 1, :<, 2 #=> fail
560
+ #
561
+ # source://minitest//lib/minitest/assertions.rb#730
562
+ def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
563
+
564
+ # Fails if +path+ exists.
565
+ #
566
+ # source://minitest//lib/minitest/assertions.rb#739
567
+ def refute_path_exists(path, msg = T.unsafe(nil)); end
568
+
569
+ # For testing with predicates.
570
+ #
571
+ # refute_predicate str, :empty?
572
+ #
573
+ # This is really meant for specs and is front-ended by refute_operator:
574
+ #
575
+ # str.wont_be :empty?
576
+ #
577
+ # source://minitest//lib/minitest/assertions.rb#753
578
+ def refute_predicate(o1, op, msg = T.unsafe(nil)); end
579
+
580
+ # Fails if +obj+ responds to the message +meth+.
581
+ #
582
+ # source://minitest//lib/minitest/assertions.rb#761
583
+ def refute_respond_to(obj, meth, msg = T.unsafe(nil)); end
584
+
585
+ # Fails if +exp+ is the same (by object identity) as +act+.
586
+ #
587
+ # source://minitest//lib/minitest/assertions.rb#770
588
+ def refute_same(exp, act, msg = T.unsafe(nil)); end
589
+
590
+ # Skips the current run. If run in verbose-mode, the skipped run
591
+ # gets listed at the end of the run but doesn't cause a failure
592
+ # exit code.
593
+ #
594
+ # @raise [Minitest::Skip]
595
+ #
596
+ # source://minitest//lib/minitest/assertions.rb#783
597
+ def skip(msg = T.unsafe(nil), bt = T.unsafe(nil)); end
598
+
599
+ # Skips the current run until a given date (in the local time
600
+ # zone). This allows you to put some fixes on hold until a later
601
+ # date, but still holds you accountable and prevents you from
602
+ # forgetting it.
603
+ #
604
+ # source://minitest//lib/minitest/assertions.rb#795
605
+ def skip_until(y, m, d, msg); end
606
+
607
+ # Was this testcase skipped? Meant for #teardown.
608
+ #
609
+ # @return [Boolean]
610
+ #
611
+ # source://minitest//lib/minitest/assertions.rb#804
612
+ def skipped?; end
613
+
614
+ # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff.
615
+ #
616
+ # Criterion:
617
+ #
618
+ # 1. Strings include newlines or escaped newlines, but not both.
619
+ # 2. or: String lengths are > 30 characters.
620
+ # 3. or: Strings are equal to each other (but maybe different encodings?).
621
+ # 4. and: we found a diff executable.
622
+ #
623
+ # source://minitest//lib/minitest/assertions.rb#104
624
+ def things_to_diff(exp, act); end
625
+
626
+ class << self
627
+ # Returns the diff command to use in #diff. Tries to intelligently
628
+ # figure out what diff to use.
629
+ #
630
+ # source://minitest//lib/minitest/assertions.rb#29
631
+ def diff; end
632
+
633
+ # Set the diff command to use in #diff.
634
+ #
635
+ # source://minitest//lib/minitest/assertions.rb#47
636
+ def diff=(o); end
637
+ end
638
+ end
639
+
640
+ # source://minitest//lib/minitest/assertions.rb#201
641
+ Minitest::Assertions::E = T.let(T.unsafe(nil), String)
642
+
643
+ # source://minitest//lib/minitest/assertions.rb#19
644
+ Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object)
645
+
646
+ # The standard backtrace filter for minitest.
647
+ #
648
+ # See Minitest.backtrace_filter=.
649
+ #
650
+ # source://minitest//lib/minitest.rb#1027
651
+ class Minitest::BacktraceFilter
652
+ # Filter +bt+ to something useful. Returns the whole thing if
653
+ # $DEBUG (ruby) or $MT_DEBUG (env).
654
+ #
655
+ # source://minitest//lib/minitest.rb#1035
656
+ def filter(bt); end
657
+ end
658
+
659
+ # source://minitest//lib/minitest.rb#1029
660
+ Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp)
661
+
662
+ # Dispatch to multiple reporters as one.
663
+ #
664
+ # source://minitest//lib/minitest.rb#844
665
+ class Minitest::CompositeReporter < ::Minitest::AbstractReporter
666
+ # @return [CompositeReporter] a new instance of CompositeReporter
667
+ #
668
+ # source://minitest//lib/minitest.rb#850
669
+ def initialize(*reporters); end
670
+
671
+ # Add another reporter to the mix.
672
+ #
673
+ # source://minitest//lib/minitest.rb#862
674
+ def <<(reporter); end
675
+
676
+ # source://minitest//lib/minitest.rb#855
677
+ def io; end
678
+
679
+ # @return [Boolean]
680
+ #
681
+ # source://minitest//lib/minitest.rb#866
682
+ def passed?; end
683
+
684
+ # source://minitest//lib/minitest.rb#874
685
+ def prerecord(klass, name); end
686
+
687
+ # source://minitest//lib/minitest.rb#881
688
+ def record(result); end
689
+
690
+ # source://minitest//lib/minitest.rb#887
691
+ def report; end
692
+
693
+ # The list of reporters to dispatch to.
694
+ #
695
+ # source://minitest//lib/minitest.rb#848
696
+ def reporters; end
697
+
698
+ # The list of reporters to dispatch to.
699
+ #
700
+ # source://minitest//lib/minitest.rb#848
701
+ def reporters=(_arg0); end
702
+
703
+ # source://minitest//lib/minitest.rb#870
704
+ def start; end
705
+ end
706
+
707
+ # source://minitest//lib/minitest/spec.rb#41
708
+ class Minitest::Expectation < ::Struct
709
+ def ctx; end
710
+ def ctx=(_); end
711
+
712
+ # source://minitest//lib/minitest/spec.rb#25
713
+ def must_be(*args, **_arg1); end
714
+
715
+ # source://minitest//lib/minitest/spec.rb#25
716
+ def must_be_close_to(*args, **_arg1); end
717
+
718
+ # source://minitest//lib/minitest/spec.rb#25
719
+ def must_be_empty(*args, **_arg1); end
720
+
721
+ # source://minitest//lib/minitest/spec.rb#25
722
+ def must_be_instance_of(*args, **_arg1); end
723
+
724
+ # source://minitest//lib/minitest/spec.rb#25
725
+ def must_be_kind_of(*args, **_arg1); end
726
+
727
+ # source://minitest//lib/minitest/spec.rb#25
728
+ def must_be_nil(*args, **_arg1); end
729
+
730
+ # source://minitest//lib/minitest/spec.rb#25
731
+ def must_be_same_as(*args, **_arg1); end
732
+
733
+ # source://minitest//lib/minitest/spec.rb#25
734
+ def must_be_silent(*args, **_arg1); end
735
+
736
+ # source://minitest//lib/minitest/spec.rb#25
737
+ def must_be_within_delta(*args, **_arg1); end
738
+
739
+ # source://minitest//lib/minitest/spec.rb#25
740
+ def must_be_within_epsilon(*args, **_arg1); end
741
+
742
+ # source://minitest//lib/minitest/spec.rb#25
743
+ def must_equal(*args, **_arg1); end
744
+
745
+ # source://minitest//lib/minitest/spec.rb#25
746
+ def must_include(*args, **_arg1); end
747
+
748
+ # source://minitest//lib/minitest/spec.rb#25
749
+ def must_match(*args, **_arg1); end
750
+
751
+ # source://minitest//lib/minitest/spec.rb#25
752
+ def must_output(*args, **_arg1); end
753
+
754
+ # source://minitest//lib/minitest/spec.rb#25
755
+ def must_raise(*args, **_arg1); end
756
+
757
+ # source://minitest//lib/minitest/spec.rb#25
758
+ def must_respond_to(*args, **_arg1); end
759
+
760
+ # source://minitest//lib/minitest/spec.rb#25
761
+ def must_throw(*args, **_arg1); end
762
+
763
+ # source://minitest//lib/minitest/spec.rb#25
764
+ def path_must_exist(*args, **_arg1); end
765
+
766
+ # source://minitest//lib/minitest/spec.rb#25
767
+ def path_wont_exist(*args, **_arg1); end
768
+
769
+ def target; end
770
+ def target=(_); end
771
+
772
+ # source://minitest//lib/minitest/spec.rb#25
773
+ def wont_be(*args, **_arg1); end
774
+
775
+ # source://minitest//lib/minitest/spec.rb#25
776
+ def wont_be_close_to(*args, **_arg1); end
777
+
778
+ # source://minitest//lib/minitest/spec.rb#25
779
+ def wont_be_empty(*args, **_arg1); end
780
+
781
+ # source://minitest//lib/minitest/spec.rb#25
782
+ def wont_be_instance_of(*args, **_arg1); end
783
+
784
+ # source://minitest//lib/minitest/spec.rb#25
785
+ def wont_be_kind_of(*args, **_arg1); end
786
+
787
+ # source://minitest//lib/minitest/spec.rb#25
788
+ def wont_be_nil(*args, **_arg1); end
789
+
790
+ # source://minitest//lib/minitest/spec.rb#25
791
+ def wont_be_same_as(*args, **_arg1); end
792
+
793
+ # source://minitest//lib/minitest/spec.rb#25
794
+ def wont_be_within_delta(*args, **_arg1); end
795
+
796
+ # source://minitest//lib/minitest/spec.rb#25
797
+ def wont_be_within_epsilon(*args, **_arg1); end
798
+
799
+ # source://minitest//lib/minitest/spec.rb#25
800
+ def wont_equal(*args, **_arg1); end
801
+
802
+ # source://minitest//lib/minitest/spec.rb#25
803
+ def wont_include(*args, **_arg1); end
804
+
805
+ # source://minitest//lib/minitest/spec.rb#25
806
+ def wont_match(*args, **_arg1); end
807
+
808
+ # source://minitest//lib/minitest/spec.rb#25
809
+ def wont_respond_to(*args, **_arg1); end
810
+
811
+ class << self
812
+ def [](*_arg0); end
813
+ def inspect; end
814
+ def keyword_init?; end
815
+ def members; end
816
+ def new(*_arg0); end
817
+ end
818
+ end
819
+
820
+ # It's where you hide your "assertions".
821
+ #
822
+ # Please note, because of the way that expectations are implemented,
823
+ # all expectations (eg must_equal) are dependent upon a thread local
824
+ # variable +:current_spec+. If your specs rely on mixing threads into
825
+ # the specs themselves, you're better off using assertions or the new
826
+ # _(value) wrapper. For example:
827
+ #
828
+ # it "should still work in threads" do
829
+ # my_threaded_thingy do
830
+ # (1+1).must_equal 2 # bad
831
+ # assert_equal 2, 1+1 # good
832
+ # _(1 + 1).must_equal 2 # good
833
+ # value(1 + 1).must_equal 2 # good, also #expect
834
+ # _ { 1 + "1" }.must_raise TypeError # good
835
+ # end
836
+ # end
837
+ #
838
+ # source://minitest//lib/minitest/expectations.rb#20
839
+ module Minitest::Expectations
840
+ # source://minitest//lib/minitest/spec.rb#15
841
+ def must_be(*args, **_arg1); end
842
+
843
+ # source://minitest//lib/minitest/spec.rb#15
844
+ def must_be_close_to(*args, **_arg1); end
845
+
846
+ # source://minitest//lib/minitest/spec.rb#15
847
+ def must_be_empty(*args, **_arg1); end
848
+
849
+ # source://minitest//lib/minitest/spec.rb#15
850
+ def must_be_instance_of(*args, **_arg1); end
851
+
852
+ # source://minitest//lib/minitest/spec.rb#15
853
+ def must_be_kind_of(*args, **_arg1); end
854
+
855
+ # source://minitest//lib/minitest/spec.rb#15
856
+ def must_be_nil(*args, **_arg1); end
857
+
858
+ # source://minitest//lib/minitest/spec.rb#15
859
+ def must_be_same_as(*args, **_arg1); end
860
+
861
+ # source://minitest//lib/minitest/spec.rb#15
862
+ def must_be_silent(*args, **_arg1); end
863
+
864
+ # source://minitest//lib/minitest/spec.rb#15
865
+ def must_be_within_delta(*args, **_arg1); end
866
+
867
+ # source://minitest//lib/minitest/spec.rb#15
868
+ def must_be_within_epsilon(*args, **_arg1); end
869
+
870
+ # source://minitest//lib/minitest/spec.rb#15
871
+ def must_equal(*args, **_arg1); end
872
+
873
+ # source://minitest//lib/minitest/spec.rb#15
874
+ def must_include(*args, **_arg1); end
875
+
876
+ # source://minitest//lib/minitest/spec.rb#15
877
+ def must_match(*args, **_arg1); end
878
+
879
+ # source://minitest//lib/minitest/spec.rb#15
880
+ def must_output(*args, **_arg1); end
881
+
882
+ # source://minitest//lib/minitest/spec.rb#15
883
+ def must_raise(*args, **_arg1); end
884
+
885
+ # source://minitest//lib/minitest/spec.rb#15
886
+ def must_respond_to(*args, **_arg1); end
887
+
888
+ # source://minitest//lib/minitest/spec.rb#15
889
+ def must_throw(*args, **_arg1); end
890
+
891
+ # source://minitest//lib/minitest/spec.rb#15
892
+ def path_must_exist(*args, **_arg1); end
893
+
894
+ # source://minitest//lib/minitest/spec.rb#15
895
+ def path_wont_exist(*args, **_arg1); end
896
+
897
+ # source://minitest//lib/minitest/spec.rb#15
898
+ def wont_be(*args, **_arg1); end
899
+
900
+ # source://minitest//lib/minitest/spec.rb#15
901
+ def wont_be_close_to(*args, **_arg1); end
902
+
903
+ # source://minitest//lib/minitest/spec.rb#15
904
+ def wont_be_empty(*args, **_arg1); end
905
+
906
+ # source://minitest//lib/minitest/spec.rb#15
907
+ def wont_be_instance_of(*args, **_arg1); end
908
+
909
+ # source://minitest//lib/minitest/spec.rb#15
910
+ def wont_be_kind_of(*args, **_arg1); end
911
+
912
+ # source://minitest//lib/minitest/spec.rb#15
913
+ def wont_be_nil(*args, **_arg1); end
914
+
915
+ # source://minitest//lib/minitest/spec.rb#15
916
+ def wont_be_same_as(*args, **_arg1); end
917
+
918
+ # source://minitest//lib/minitest/spec.rb#15
919
+ def wont_be_within_delta(*args, **_arg1); end
920
+
921
+ # source://minitest//lib/minitest/spec.rb#15
922
+ def wont_be_within_epsilon(*args, **_arg1); end
923
+
924
+ # source://minitest//lib/minitest/spec.rb#15
925
+ def wont_equal(*args, **_arg1); end
926
+
927
+ # source://minitest//lib/minitest/spec.rb#15
928
+ def wont_include(*args, **_arg1); end
929
+
930
+ # source://minitest//lib/minitest/spec.rb#15
931
+ def wont_match(*args, **_arg1); end
932
+
933
+ # source://minitest//lib/minitest/spec.rb#15
934
+ def wont_respond_to(*args, **_arg1); end
935
+ end
936
+
937
+ # Provides a simple set of guards that you can use in your tests
938
+ # to skip execution if it is not applicable. These methods are
939
+ # mixed into Test as both instance and class methods so you
940
+ # can use them inside or outside of the test methods.
941
+ #
942
+ # def test_something_for_mri
943
+ # skip "bug 1234" if jruby?
944
+ # # ...
945
+ # end
946
+ #
947
+ # if windows? then
948
+ # # ... lots of test methods ...
949
+ # end
950
+ #
951
+ # source://minitest//lib/minitest.rb#971
952
+ module Minitest::Guard
953
+ # Is this running on jruby?
954
+ #
955
+ # @return [Boolean]
956
+ #
957
+ # source://minitest//lib/minitest.rb#976
958
+ def jruby?(platform = T.unsafe(nil)); end
959
+
960
+ # Is this running on maglev?
961
+ #
962
+ # @return [Boolean]
963
+ #
964
+ # source://minitest//lib/minitest.rb#983
965
+ def maglev?(platform = T.unsafe(nil)); end
966
+
967
+ # Is this running on mri?
968
+ #
969
+ # @return [Boolean]
970
+ #
971
+ # source://minitest//lib/minitest.rb#993
972
+ def mri?(platform = T.unsafe(nil)); end
973
+
974
+ # Is this running on macOS?
975
+ #
976
+ # @return [Boolean]
977
+ #
978
+ # source://minitest//lib/minitest.rb#1000
979
+ def osx?(platform = T.unsafe(nil)); end
980
+
981
+ # Is this running on rubinius?
982
+ #
983
+ # @return [Boolean]
984
+ #
985
+ # source://minitest//lib/minitest.rb#1007
986
+ def rubinius?(platform = T.unsafe(nil)); end
987
+
988
+ # Is this running on windows?
989
+ #
990
+ # @return [Boolean]
991
+ #
992
+ # source://minitest//lib/minitest.rb#1017
993
+ def windows?(platform = T.unsafe(nil)); end
994
+ end
995
+
996
+ # A simple and clean mock object framework.
997
+ #
998
+ # All mock objects are an instance of Mock
999
+ #
1000
+ # source://minitest//lib/minitest/mock.rb#10
1001
+ class Minitest::Mock
1002
+ # @return [Mock] a new instance of Mock
1003
+ #
1004
+ # source://minitest//lib/minitest/mock.rb#48
1005
+ def initialize(delegator = T.unsafe(nil)); end
1006
+
1007
+ # source://minitest//lib/minitest/mock.rb#31
1008
+ def ===(*args, **kwargs, &b); end
1009
+
1010
+ # source://minitest//lib/minitest/mock.rb#120
1011
+ def __call(name, data); end
1012
+
1013
+ def __respond_to?(*_arg0); end
1014
+
1015
+ # source://minitest//lib/minitest/mock.rb#31
1016
+ def class(*args, **kwargs, &b); end
1017
+
1018
+ # Expect that method +name+ is called, optionally with +args+ (and
1019
+ # +kwargs+ or a +blk+, and returns +retval+.
1020
+ #
1021
+ # @mock.expect(:meaning_of_life, 42)
1022
+ # @mock.meaning_of_life # => 42
1023
+ #
1024
+ # @mock.expect(:do_something_with, true, [some_obj, true])
1025
+ # @mock.do_something_with(some_obj, true) # => true
1026
+ #
1027
+ # @mock.expect(:do_something_else, true) do |a1, a2|
1028
+ # a1 == "buggs" && a2 == :bunny
1029
+ # end
1030
+ #
1031
+ # +args+ is compared to the expected args using case equality (ie, the
1032
+ # '===' operator), allowing for less specific expectations.
1033
+ #
1034
+ # @mock.expect(:uses_any_string, true, [String])
1035
+ # @mock.uses_any_string("foo") # => true
1036
+ # @mock.verify # => true
1037
+ #
1038
+ # @mock.expect(:uses_one_string, true, ["foo"])
1039
+ # @mock.uses_one_string("bar") # => raises MockExpectationError
1040
+ #
1041
+ # If a method will be called multiple times, specify a new expect for each one.
1042
+ # They will be used in the order you define them.
1043
+ #
1044
+ # @mock.expect(:ordinal_increment, 'first')
1045
+ # @mock.expect(:ordinal_increment, 'second')
1046
+ #
1047
+ # @mock.ordinal_increment # => 'first'
1048
+ # @mock.ordinal_increment # => 'second'
1049
+ # @mock.ordinal_increment # => raises MockExpectationError "No more expects available for :ordinal_increment"
1050
+ #
1051
+ # source://minitest//lib/minitest/mock.rb#91
1052
+ def expect(name, retval, args = T.unsafe(nil), **kwargs, &blk); end
1053
+
1054
+ # source://minitest//lib/minitest/mock.rb#31
1055
+ def inspect(*args, **kwargs, &b); end
1056
+
1057
+ # source://minitest//lib/minitest/mock.rb#31
1058
+ def instance_eval(*args, **kwargs, &b); end
1059
+
1060
+ # source://minitest//lib/minitest/mock.rb#31
1061
+ def instance_variables(*args, **kwargs, &b); end
1062
+
1063
+ # source://minitest//lib/minitest/mock.rb#150
1064
+ def method_missing(sym, *args, **kwargs, &block); end
1065
+
1066
+ # source://minitest//lib/minitest/mock.rb#31
1067
+ def object_id(*args, **kwargs, &b); end
1068
+
1069
+ # source://minitest//lib/minitest/mock.rb#31
1070
+ def public_send(*args, **kwargs, &b); end
1071
+
1072
+ # @return [Boolean]
1073
+ #
1074
+ # source://minitest//lib/minitest/mock.rb#236
1075
+ def respond_to?(sym, include_private = T.unsafe(nil)); end
1076
+
1077
+ # source://minitest//lib/minitest/mock.rb#31
1078
+ def send(*args, **kwargs, &b); end
1079
+
1080
+ # source://minitest//lib/minitest/mock.rb#31
1081
+ def to_s(*args, **kwargs, &b); end
1082
+
1083
+ # Verify that all methods were called as expected. Raises
1084
+ # +MockExpectationError+ if the mock object was not called as
1085
+ # expected.
1086
+ #
1087
+ # source://minitest//lib/minitest/mock.rb#140
1088
+ def verify; end
1089
+
1090
+ private
1091
+
1092
+ # source://minitest//lib/minitest/mock.rb#31
1093
+ def respond_to_missing?(*args, **kwargs, &b); end
1094
+ end
1095
+
1096
+ # source://minitest//lib/minitest/parallel.rb#2
1097
+ module Minitest::Parallel; end
1098
+
1099
+ # The engine used to run multiple tests in parallel.
1100
+ #
1101
+ # source://minitest//lib/minitest/parallel.rb#7
1102
+ class Minitest::Parallel::Executor
1103
+ # Create a parallel test executor of with +size+ workers.
1104
+ #
1105
+ # @return [Executor] a new instance of Executor
1106
+ #
1107
+ # source://minitest//lib/minitest/parallel.rb#17
1108
+ def initialize(size); end
1109
+
1110
+ # Add a job to the queue
1111
+ #
1112
+ # source://minitest//lib/minitest/parallel.rb#43
1113
+ def <<(work); end
1114
+
1115
+ # Shuts down the pool of workers by signalling them to quit and
1116
+ # waiting for them all to finish what they're currently working
1117
+ # on.
1118
+ #
1119
+ # source://minitest//lib/minitest/parallel.rb#50
1120
+ def shutdown; end
1121
+
1122
+ # The size of the pool of workers.
1123
+ #
1124
+ # source://minitest//lib/minitest/parallel.rb#12
1125
+ def size; end
1126
+
1127
+ # Start the executor
1128
+ #
1129
+ # source://minitest//lib/minitest/parallel.rb#26
1130
+ def start; end
1131
+ end
1132
+
1133
+ # source://minitest//lib/minitest/parallel.rb#56
1134
+ module Minitest::Parallel::Test
1135
+ # source://minitest//lib/minitest/parallel.rb#57
1136
+ def _synchronize; end
1137
+ end
1138
+
1139
+ # source://minitest//lib/minitest/parallel.rb#59
1140
+ module Minitest::Parallel::Test::ClassMethods
1141
+ # source://minitest//lib/minitest/parallel.rb#60
1142
+ def run_one_method(klass, method_name, reporter); end
1143
+
1144
+ # source://minitest//lib/minitest/parallel.rb#64
1145
+ def test_order; end
1146
+ end
1147
+
1148
+ # A very simple reporter that prints the "dots" during the run.
1149
+ #
1150
+ # This is added to the top-level CompositeReporter at the start of
1151
+ # the run. If you want to change the output of minitest via a
1152
+ # plugin, pull this out of the composite and replace it with your
1153
+ # own.
1154
+ #
1155
+ # source://minitest//lib/minitest.rb#643
1156
+ class Minitest::ProgressReporter < ::Minitest::Reporter
1157
+ # source://minitest//lib/minitest.rb#644
1158
+ def prerecord(klass, name); end
1159
+
1160
+ # source://minitest//lib/minitest.rb#651
1161
+ def record(result); end
1162
+ end
1163
+
1164
+ # Shared code for anything that can get passed to a Reporter. See
1165
+ # Minitest::Test & Minitest::Result.
1166
+ #
1167
+ # source://minitest//lib/minitest.rb#475
1168
+ module Minitest::Reportable
1169
+ # @raise [NotImplementedError]
1170
+ #
1171
+ # source://minitest//lib/minitest.rb#495
1172
+ def class_name; end
1173
+
1174
+ # Did this run error?
1175
+ #
1176
+ # @return [Boolean]
1177
+ #
1178
+ # source://minitest//lib/minitest.rb#516
1179
+ def error?; end
1180
+
1181
+ # The location identifier of this test. Depends on a method
1182
+ # existing called class_name.
1183
+ #
1184
+ # source://minitest//lib/minitest.rb#490
1185
+ def location; end
1186
+
1187
+ # Did this run pass?
1188
+ #
1189
+ # Note: skipped runs are not considered passing, but they don't
1190
+ # cause the process to exit non-zero.
1191
+ #
1192
+ # @return [Boolean]
1193
+ #
1194
+ # source://minitest//lib/minitest.rb#482
1195
+ def passed?; end
1196
+
1197
+ # Returns ".", "F", or "E" based on the result of the run.
1198
+ #
1199
+ # source://minitest//lib/minitest.rb#502
1200
+ def result_code; end
1201
+
1202
+ # Was this run skipped?
1203
+ #
1204
+ # @return [Boolean]
1205
+ #
1206
+ # source://minitest//lib/minitest.rb#509
1207
+ def skipped?; end
1208
+ end
1209
+
1210
+ # source://minitest//lib/minitest.rb#619
1211
+ class Minitest::Reporter < ::Minitest::AbstractReporter
1212
+ # @return [Reporter] a new instance of Reporter
1213
+ #
1214
+ # source://minitest//lib/minitest.rb#628
1215
+ def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end
1216
+
1217
+ # The IO used to report.
1218
+ #
1219
+ # source://minitest//lib/minitest.rb#621
1220
+ def io; end
1221
+
1222
+ # The IO used to report.
1223
+ #
1224
+ # source://minitest//lib/minitest.rb#621
1225
+ def io=(_arg0); end
1226
+
1227
+ # Command-line options for this run.
1228
+ #
1229
+ # source://minitest//lib/minitest.rb#626
1230
+ def options; end
1231
+
1232
+ # Command-line options for this run.
1233
+ #
1234
+ # source://minitest//lib/minitest.rb#626
1235
+ def options=(_arg0); end
1236
+ end
1237
+
1238
+ # This represents a test result in a clean way that can be
1239
+ # marshalled over a wire. Tests can do anything they want to the
1240
+ # test instance and can create conditions that cause Marshal.dump to
1241
+ # blow up. By using Result.from(a_test) you can be reasonably sure
1242
+ # that the test result can be marshalled.
1243
+ #
1244
+ # source://minitest//lib/minitest.rb#528
1245
+ class Minitest::Result < ::Minitest::Runnable
1246
+ include ::Minitest::Reportable
1247
+
1248
+ # source://minitest//lib/minitest.rb#561
1249
+ def class_name; end
1250
+
1251
+ # The class name of the test result.
1252
+ #
1253
+ # source://minitest//lib/minitest.rb#537
1254
+ def klass; end
1255
+
1256
+ # The class name of the test result.
1257
+ #
1258
+ # source://minitest//lib/minitest.rb#537
1259
+ def klass=(_arg0); end
1260
+
1261
+ # The location of the test method.
1262
+ #
1263
+ # source://minitest//lib/minitest.rb#542
1264
+ def source_location; end
1265
+
1266
+ # The location of the test method.
1267
+ #
1268
+ # source://minitest//lib/minitest.rb#542
1269
+ def source_location=(_arg0); end
1270
+
1271
+ # source://minitest//lib/minitest.rb#565
1272
+ def to_s; end
1273
+
1274
+ class << self
1275
+ # Create a new test result from a Runnable instance.
1276
+ #
1277
+ # source://minitest//lib/minitest.rb#547
1278
+ def from(runnable); end
1279
+ end
1280
+ end
1281
+
1282
+ # re-open
1283
+ #
1284
+ # source://minitest//lib/minitest.rb#277
1285
+ class Minitest::Runnable
1286
+ # @return [Runnable] a new instance of Runnable
1287
+ #
1288
+ # source://minitest//lib/minitest.rb#431
1289
+ def initialize(name); end
1290
+
1291
+ # Number of assertions executed in this run.
1292
+ #
1293
+ # source://minitest//lib/minitest.rb#281
1294
+ def assertions; end
1295
+
1296
+ # Number of assertions executed in this run.
1297
+ #
1298
+ # source://minitest//lib/minitest.rb#281
1299
+ def assertions=(_arg0); end
1300
+
1301
+ # source://minitest//lib/minitest.rb#427
1302
+ def failure; end
1303
+
1304
+ # An assertion raised during the run, if any.
1305
+ #
1306
+ # source://minitest//lib/minitest.rb#286
1307
+ def failures; end
1308
+
1309
+ # An assertion raised during the run, if any.
1310
+ #
1311
+ # source://minitest//lib/minitest.rb#286
1312
+ def failures=(_arg0); end
1313
+
1314
+ # source://minitest//lib/minitest.rb#413
1315
+ def marshal_dump; end
1316
+
1317
+ # source://minitest//lib/minitest.rb#423
1318
+ def marshal_load(ary); end
1319
+
1320
+ # Name of the run.
1321
+ #
1322
+ # source://minitest//lib/minitest.rb#304
1323
+ def name; end
1324
+
1325
+ # Set the name of the run.
1326
+ #
1327
+ # source://minitest//lib/minitest.rb#311
1328
+ def name=(o); end
1329
+
1330
+ # Did this run pass?
1331
+ #
1332
+ # Note: skipped runs are not considered passing, but they don't
1333
+ # cause the process to exit non-zero.
1334
+ #
1335
+ # @raise [NotImplementedError]
1336
+ # @return [Boolean]
1337
+ #
1338
+ # source://minitest//lib/minitest.rb#450
1339
+ def passed?; end
1340
+
1341
+ # Returns a single character string to print based on the result
1342
+ # of the run. One of <tt>"."</tt>, <tt>"F"</tt>,
1343
+ # <tt>"E"</tt> or <tt>"S"</tt>.
1344
+ #
1345
+ # @raise [NotImplementedError]
1346
+ #
1347
+ # source://minitest//lib/minitest.rb#459
1348
+ def result_code; end
1349
+
1350
+ # Runs a single method. Needs to return self.
1351
+ #
1352
+ # @raise [NotImplementedError]
1353
+ #
1354
+ # source://minitest//lib/minitest.rb#440
1355
+ def run; end
1356
+
1357
+ # Was this run skipped? See #passed? for more information.
1358
+ #
1359
+ # @raise [NotImplementedError]
1360
+ # @return [Boolean]
1361
+ #
1362
+ # source://minitest//lib/minitest.rb#466
1363
+ def skipped?; end
1364
+
1365
+ # The time it took to run.
1366
+ #
1367
+ # source://minitest//lib/minitest.rb#291
1368
+ def time; end
1369
+
1370
+ # The time it took to run.
1371
+ #
1372
+ # source://minitest//lib/minitest.rb#291
1373
+ def time=(_arg0); end
1374
+
1375
+ # source://minitest//lib/minitest.rb#293
1376
+ def time_it; end
1377
+
1378
+ class << self
1379
+ # source://minitest//lib/minitest.rb#1069
1380
+ def inherited(klass); end
1381
+
1382
+ # Returns all instance methods matching the pattern +re+.
1383
+ #
1384
+ # source://minitest//lib/minitest.rb#318
1385
+ def methods_matching(re); end
1386
+
1387
+ # source://minitest//lib/minitest.rb#383
1388
+ def on_signal(name, action); end
1389
+
1390
+ # source://minitest//lib/minitest.rb#322
1391
+ def reset; end
1392
+
1393
+ # Responsible for running all runnable methods in a given class,
1394
+ # each in its own instance. Each instance is passed to the
1395
+ # reporter to record.
1396
+ #
1397
+ # source://minitest//lib/minitest.rb#333
1398
+ def run(reporter, options = T.unsafe(nil)); end
1399
+
1400
+ # Runs a single method and has the reporter record the result.
1401
+ # This was considered internal API but is factored out of run so
1402
+ # that subclasses can specialize the running of an individual
1403
+ # test. See Minitest::ParallelTest::ClassMethods for an example.
1404
+ #
1405
+ # source://minitest//lib/minitest.rb#363
1406
+ def run_one_method(klass, method_name, reporter); end
1407
+
1408
+ # Each subclass of Runnable is responsible for overriding this
1409
+ # method to return all runnable methods. See #methods_matching.
1410
+ #
1411
+ # @raise [NotImplementedError]
1412
+ #
1413
+ # source://minitest//lib/minitest.rb#400
1414
+ def runnable_methods; end
1415
+
1416
+ # Returns all subclasses of Runnable.
1417
+ #
1418
+ # source://minitest//lib/minitest.rb#407
1419
+ def runnables; end
1420
+
1421
+ # source://minitest//lib/minitest.rb#368
1422
+ def with_info_handler(reporter, &block); end
1423
+ end
1424
+ end
1425
+
1426
+ # source://minitest//lib/minitest.rb#381
1427
+ Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash)
1428
+
1429
+ # Assertion raised when skipping a run.
1430
+ #
1431
+ # source://minitest//lib/minitest.rb#924
1432
+ class Minitest::Skip < ::Minitest::Assertion
1433
+ # source://minitest//lib/minitest.rb#925
1434
+ def result_label; end
1435
+ end
1436
+
1437
+ # Minitest::Spec -- The faster, better, less-magical spec framework!
1438
+ #
1439
+ # For a list of expectations, see Minitest::Expectations.
1440
+ #
1441
+ # source://minitest//lib/minitest/spec.rb#106
1442
+ class Minitest::Spec < ::Minitest::Test
1443
+ include ::Minitest::Spec::DSL::InstanceMethods
1444
+ extend ::Minitest::Spec::DSL
1445
+
1446
+ # @return [Spec] a new instance of Spec
1447
+ #
1448
+ # source://minitest//lib/minitest/spec.rb#112
1449
+ def initialize(name); end
1450
+
1451
+ class << self
1452
+ # source://minitest//lib/minitest/spec.rb#108
1453
+ def current; end
1454
+ end
1455
+ end
1456
+
1457
+ # Oh look! A Minitest::Spec::DSL module! Eat your heart out DHH.
1458
+ #
1459
+ # source://minitest//lib/minitest/spec.rb#120
1460
+ module Minitest::Spec::DSL
1461
+ # Define an 'after' action. Inherits the way normal methods should.
1462
+ #
1463
+ # NOTE: +type+ is ignored and is only there to make porting easier.
1464
+ #
1465
+ # Equivalent to Minitest::Test#teardown.
1466
+ #
1467
+ # source://minitest//lib/minitest/spec.rb#205
1468
+ def after(_type = T.unsafe(nil), &block); end
1469
+
1470
+ # Define a 'before' action. Inherits the way normal methods should.
1471
+ #
1472
+ # NOTE: +type+ is ignored and is only there to make porting easier.
1473
+ #
1474
+ # Equivalent to Minitest::Test#setup.
1475
+ #
1476
+ # source://minitest//lib/minitest/spec.rb#191
1477
+ def before(_type = T.unsafe(nil), &block); end
1478
+
1479
+ # source://minitest//lib/minitest/spec.rb#174
1480
+ def children; end
1481
+
1482
+ # source://minitest//lib/minitest/spec.rb#270
1483
+ def create(name, desc); end
1484
+
1485
+ # source://minitest//lib/minitest/spec.rb#291
1486
+ def desc; end
1487
+
1488
+ # source://minitest//lib/minitest/spec.rb#170
1489
+ def describe_stack; end
1490
+
1491
+ # Define an expectation with name +desc+. Name gets morphed to a
1492
+ # proper test method name. For some freakish reason, people who
1493
+ # write specs don't like class inheritance, so this goes way out of
1494
+ # its way to make sure that expectations aren't inherited.
1495
+ #
1496
+ # This is also aliased to #specify and doesn't require a +desc+ arg.
1497
+ #
1498
+ # Hint: If you _do_ want inheritance, use minitest/test. You can mix
1499
+ # and match between assertions and expectations as much as you want.
1500
+ #
1501
+ # source://minitest//lib/minitest/spec.rb#223
1502
+ def it(desc = T.unsafe(nil), &block); end
1503
+
1504
+ # Essentially, define an accessor for +name+ with +block+.
1505
+ #
1506
+ # Why use let instead of def? I honestly don't know.
1507
+ #
1508
+ # @raise [ArgumentError]
1509
+ #
1510
+ # source://minitest//lib/minitest/spec.rb#247
1511
+ def let(name, &block); end
1512
+
1513
+ # source://minitest//lib/minitest/spec.rb#283
1514
+ def name; end
1515
+
1516
+ # source://minitest//lib/minitest/spec.rb#178
1517
+ def nuke_test_methods!; end
1518
+
1519
+ # Register a new type of spec that matches the spec's description.
1520
+ # This method can take either a Regexp and a spec class or a spec
1521
+ # class and a block that takes the description and returns true if
1522
+ # it matches.
1523
+ #
1524
+ # Eg:
1525
+ #
1526
+ # register_spec_type(/Controller$/, Minitest::Spec::Rails)
1527
+ #
1528
+ # or:
1529
+ #
1530
+ # register_spec_type(Minitest::Spec::RailsModel) do |desc|
1531
+ # desc.superclass == ActiveRecord::Base
1532
+ # end
1533
+ #
1534
+ # source://minitest//lib/minitest/spec.rb#146
1535
+ def register_spec_type(*args, &block); end
1536
+
1537
+ # Figure out the spec class to use based on a spec's description. Eg:
1538
+ #
1539
+ # spec_type("BlahController") # => Minitest::Spec::Rails
1540
+ #
1541
+ # source://minitest//lib/minitest/spec.rb#160
1542
+ def spec_type(desc, *additional); end
1543
+
1544
+ # Define an expectation with name +desc+. Name gets morphed to a
1545
+ # proper test method name. For some freakish reason, people who
1546
+ # write specs don't like class inheritance, so this goes way out of
1547
+ # its way to make sure that expectations aren't inherited.
1548
+ #
1549
+ # This is also aliased to #specify and doesn't require a +desc+ arg.
1550
+ #
1551
+ # Hint: If you _do_ want inheritance, use minitest/test. You can mix
1552
+ # and match between assertions and expectations as much as you want.
1553
+ #
1554
+ # source://minitest//lib/minitest/spec.rb#223
1555
+ def specify(desc = T.unsafe(nil), &block); end
1556
+
1557
+ # Another lazy man's accessor generator. Made even more lazy by
1558
+ # setting the name for you to +subject+.
1559
+ #
1560
+ # source://minitest//lib/minitest/spec.rb#266
1561
+ def subject(&block); end
1562
+
1563
+ # source://minitest//lib/minitest/spec.rb#287
1564
+ def to_s; end
1565
+
1566
+ class << self
1567
+ # source://minitest//lib/minitest/spec.rb#335
1568
+ def extended(obj); end
1569
+ end
1570
+ end
1571
+
1572
+ # Rdoc... why are you so dumb?
1573
+ #
1574
+ # source://minitest//lib/minitest/spec.rb#297
1575
+ module Minitest::Spec::DSL::InstanceMethods
1576
+ # Takes a value or a block and returns a value monad that has
1577
+ # all of Expectations methods available to it.
1578
+ #
1579
+ # _(1 + 1).must_equal 2
1580
+ #
1581
+ # And for blocks:
1582
+ #
1583
+ # _ { 1 + "1" }.must_raise TypeError
1584
+ #
1585
+ # This method of expectation-based testing is preferable to
1586
+ # straight-expectation methods (on Object) because it stores its
1587
+ # test context, bypassing our hacky use of thread-local variables.
1588
+ #
1589
+ # NOTE: At some point, the methods on Object will be deprecated
1590
+ # and then removed.
1591
+ #
1592
+ # It is also aliased to #value and #expect for your aesthetic
1593
+ # pleasure:
1594
+ #
1595
+ # _(1 + 1).must_equal 2
1596
+ # value(1 + 1).must_equal 2
1597
+ # expect(1 + 1).must_equal 2
1598
+ #
1599
+ # source://minitest//lib/minitest/spec.rb#322
1600
+ def _(value = T.unsafe(nil), &block); end
1601
+
1602
+ # source://minitest//lib/minitest/spec.rb#329
1603
+ def before_setup; end
1604
+
1605
+ # Takes a value or a block and returns a value monad that has
1606
+ # all of Expectations methods available to it.
1607
+ #
1608
+ # _(1 + 1).must_equal 2
1609
+ #
1610
+ # And for blocks:
1611
+ #
1612
+ # _ { 1 + "1" }.must_raise TypeError
1613
+ #
1614
+ # This method of expectation-based testing is preferable to
1615
+ # straight-expectation methods (on Object) because it stores its
1616
+ # test context, bypassing our hacky use of thread-local variables.
1617
+ #
1618
+ # NOTE: At some point, the methods on Object will be deprecated
1619
+ # and then removed.
1620
+ #
1621
+ # It is also aliased to #value and #expect for your aesthetic
1622
+ # pleasure:
1623
+ #
1624
+ # _(1 + 1).must_equal 2
1625
+ # value(1 + 1).must_equal 2
1626
+ # expect(1 + 1).must_equal 2
1627
+ #
1628
+ # source://minitest//lib/minitest/spec.rb#322
1629
+ def expect(value = T.unsafe(nil), &block); end
1630
+
1631
+ # Takes a value or a block and returns a value monad that has
1632
+ # all of Expectations methods available to it.
1633
+ #
1634
+ # _(1 + 1).must_equal 2
1635
+ #
1636
+ # And for blocks:
1637
+ #
1638
+ # _ { 1 + "1" }.must_raise TypeError
1639
+ #
1640
+ # This method of expectation-based testing is preferable to
1641
+ # straight-expectation methods (on Object) because it stores its
1642
+ # test context, bypassing our hacky use of thread-local variables.
1643
+ #
1644
+ # NOTE: At some point, the methods on Object will be deprecated
1645
+ # and then removed.
1646
+ #
1647
+ # It is also aliased to #value and #expect for your aesthetic
1648
+ # pleasure:
1649
+ #
1650
+ # _(1 + 1).must_equal 2
1651
+ # value(1 + 1).must_equal 2
1652
+ # expect(1 + 1).must_equal 2
1653
+ #
1654
+ # source://minitest//lib/minitest/spec.rb#322
1655
+ def value(value = T.unsafe(nil), &block); end
1656
+ end
1657
+
1658
+ # Contains pairs of matchers and Spec classes to be used to
1659
+ # calculate the superclass of a top-level describe. This allows for
1660
+ # automatically customizable spec types.
1661
+ #
1662
+ # See: register_spec_type and spec_type
1663
+ #
1664
+ # source://minitest//lib/minitest/spec.rb#128
1665
+ Minitest::Spec::DSL::TYPES = T.let(T.unsafe(nil), Array)
1666
+
1667
+ # source://minitest//lib/minitest/spec.rb#342
1668
+ Minitest::Spec::TYPES = T.let(T.unsafe(nil), Array)
1669
+
1670
+ # A reporter that gathers statistics about a test run. Does not do
1671
+ # any IO because meant to be used as a parent class for a reporter
1672
+ # that does.
1673
+ #
1674
+ # If you want to create an entirely different type of output (eg,
1675
+ # CI, HTML, etc), this is the place to start.
1676
+ #
1677
+ # Example:
1678
+ #
1679
+ # class JenkinsCIReporter < StatisticsReporter
1680
+ # def report
1681
+ # super # Needed to calculate some statistics
1682
+ #
1683
+ # print "<testsuite "
1684
+ # print "tests='#{count}' "
1685
+ # print "failures='#{failures}' "
1686
+ # # Remaining XML...
1687
+ # end
1688
+ # end
1689
+ #
1690
+ # source://minitest//lib/minitest.rb#679
1691
+ class Minitest::StatisticsReporter < ::Minitest::Reporter
1692
+ # @return [StatisticsReporter] a new instance of StatisticsReporter
1693
+ #
1694
+ # source://minitest//lib/minitest.rb#723
1695
+ def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end
1696
+
1697
+ # Total number of assertions.
1698
+ #
1699
+ # source://minitest//lib/minitest.rb#683
1700
+ def assertions; end
1701
+
1702
+ # Total number of assertions.
1703
+ #
1704
+ # source://minitest//lib/minitest.rb#683
1705
+ def assertions=(_arg0); end
1706
+
1707
+ # Total number of test cases.
1708
+ #
1709
+ # source://minitest//lib/minitest.rb#688
1710
+ def count; end
1711
+
1712
+ # Total number of test cases.
1713
+ #
1714
+ # source://minitest//lib/minitest.rb#688
1715
+ def count=(_arg0); end
1716
+
1717
+ # Total number of tests that erred.
1718
+ #
1719
+ # source://minitest//lib/minitest.rb#716
1720
+ def errors; end
1721
+
1722
+ # Total number of tests that erred.
1723
+ #
1724
+ # source://minitest//lib/minitest.rb#716
1725
+ def errors=(_arg0); end
1726
+
1727
+ # Total number of tests that failed.
1728
+ #
1729
+ # source://minitest//lib/minitest.rb#711
1730
+ def failures; end
1731
+
1732
+ # Total number of tests that failed.
1733
+ #
1734
+ # source://minitest//lib/minitest.rb#711
1735
+ def failures=(_arg0); end
1736
+
1737
+ # @return [Boolean]
1738
+ #
1739
+ # source://minitest//lib/minitest.rb#736
1740
+ def passed?; end
1741
+
1742
+ # source://minitest//lib/minitest.rb#744
1743
+ def record(result); end
1744
+
1745
+ # Report on the tracked statistics.
1746
+ #
1747
+ # source://minitest//lib/minitest.rb#754
1748
+ def report; end
1749
+
1750
+ # An +Array+ of test cases that failed or were skipped.
1751
+ #
1752
+ # source://minitest//lib/minitest.rb#693
1753
+ def results; end
1754
+
1755
+ # An +Array+ of test cases that failed or were skipped.
1756
+ #
1757
+ # source://minitest//lib/minitest.rb#693
1758
+ def results=(_arg0); end
1759
+
1760
+ # Total number of tests that where skipped.
1761
+ #
1762
+ # source://minitest//lib/minitest.rb#721
1763
+ def skips; end
1764
+
1765
+ # Total number of tests that where skipped.
1766
+ #
1767
+ # source://minitest//lib/minitest.rb#721
1768
+ def skips=(_arg0); end
1769
+
1770
+ # source://minitest//lib/minitest.rb#740
1771
+ def start; end
1772
+
1773
+ # Time the test run started. If available, the monotonic clock is
1774
+ # used and this is a +Float+, otherwise it's an instance of
1775
+ # +Time+.
1776
+ #
1777
+ # source://minitest//lib/minitest.rb#700
1778
+ def start_time; end
1779
+
1780
+ # Time the test run started. If available, the monotonic clock is
1781
+ # used and this is a +Float+, otherwise it's an instance of
1782
+ # +Time+.
1783
+ #
1784
+ # source://minitest//lib/minitest.rb#700
1785
+ def start_time=(_arg0); end
1786
+
1787
+ # Test run time. If available, the monotonic clock is used and
1788
+ # this is a +Float+, otherwise it's an instance of +Time+.
1789
+ #
1790
+ # source://minitest//lib/minitest.rb#706
1791
+ def total_time; end
1792
+
1793
+ # Test run time. If available, the monotonic clock is used and
1794
+ # this is a +Float+, otherwise it's an instance of +Time+.
1795
+ #
1796
+ # source://minitest//lib/minitest.rb#706
1797
+ def total_time=(_arg0); end
1798
+ end
1799
+
1800
+ # A reporter that prints the header, summary, and failure details at
1801
+ # the end of the run.
1802
+ #
1803
+ # This is added to the top-level CompositeReporter at the start of
1804
+ # the run. If you want to change the output of minitest via a
1805
+ # plugin, pull this out of the composite and replace it with your
1806
+ # own.
1807
+ #
1808
+ # source://minitest//lib/minitest.rb#774
1809
+ class Minitest::SummaryReporter < ::Minitest::StatisticsReporter
1810
+ # source://minitest//lib/minitest.rb#809
1811
+ def aggregated_results(io); end
1812
+
1813
+ # Returns the value of attribute old_sync.
1814
+ #
1815
+ # source://minitest//lib/minitest.rb#777
1816
+ def old_sync; end
1817
+
1818
+ # Sets the attribute old_sync
1819
+ #
1820
+ # @param value the value to set the attribute old_sync to.
1821
+ #
1822
+ # source://minitest//lib/minitest.rb#777
1823
+ def old_sync=(_arg0); end
1824
+
1825
+ # source://minitest//lib/minitest.rb#792
1826
+ def report; end
1827
+
1828
+ # :startdoc:
1829
+ #
1830
+ # source://minitest//lib/minitest.rb#780
1831
+ def start; end
1832
+
1833
+ # source://minitest//lib/minitest.rb#804
1834
+ def statistics; end
1835
+
1836
+ # source://minitest//lib/minitest.rb#829
1837
+ def summary; end
1838
+
1839
+ # :stopdoc:
1840
+ #
1841
+ # source://minitest//lib/minitest.rb#776
1842
+ def sync; end
1843
+
1844
+ # :stopdoc:
1845
+ #
1846
+ # source://minitest//lib/minitest.rb#776
1847
+ def sync=(_arg0); end
1848
+
1849
+ # source://minitest//lib/minitest.rb#825
1850
+ def to_s; end
1851
+ end
1852
+
1853
+ # Subclass Test to create your own tests. Typically you'll want a
1854
+ # Test subclass per implementation class.
1855
+ #
1856
+ # See Minitest::Assertions
1857
+ #
1858
+ # source://minitest//lib/minitest/test.rb#10
1859
+ class Minitest::Test < ::Minitest::Runnable
1860
+ include ::Minitest::Assertions
1861
+ include ::Minitest::Reportable
1862
+ include ::Minitest::Test::LifecycleHooks
1863
+ include ::Minitest::Guard
1864
+ extend ::Minitest::Guard
1865
+
1866
+ # LifecycleHooks
1867
+ #
1868
+ # source://minitest//lib/minitest/test.rb#198
1869
+ def capture_exceptions; end
1870
+
1871
+ # source://minitest//lib/minitest/test.rb#15
1872
+ def class_name; end
1873
+
1874
+ # source://minitest//lib/minitest/test.rb#215
1875
+ def neuter_exception(e); end
1876
+
1877
+ # source://minitest//lib/minitest/test.rb#226
1878
+ def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end
1879
+
1880
+ # Runs a single test with setup/teardown hooks.
1881
+ #
1882
+ # source://minitest//lib/minitest/test.rb#94
1883
+ def run; end
1884
+
1885
+ # source://minitest//lib/minitest/test.rb#208
1886
+ def sanitize_exception(e); end
1887
+
1888
+ # source://minitest//lib/minitest/test.rb#240
1889
+ def with_info_handler(&block); end
1890
+
1891
+ class << self
1892
+ # Call this at the top of your tests when you absolutely
1893
+ # positively need to have ordered tests. In doing so, you're
1894
+ # admitting that you suck and your tests are weak.
1895
+ #
1896
+ # source://minitest//lib/minitest/test.rb#35
1897
+ def i_suck_and_my_tests_are_order_dependent!; end
1898
+
1899
+ # Returns the value of attribute io_lock.
1900
+ #
1901
+ # source://minitest//lib/minitest/test.rb#26
1902
+ def io_lock; end
1903
+
1904
+ # Sets the attribute io_lock
1905
+ #
1906
+ # @param value the value to set the attribute io_lock to.
1907
+ #
1908
+ # source://minitest//lib/minitest/test.rb#26
1909
+ def io_lock=(_arg0); end
1910
+
1911
+ # Make diffs for this Test use #pretty_inspect so that diff
1912
+ # in assert_equal can have more details. NOTE: this is much slower
1913
+ # than the regular inspect but much more usable for complex
1914
+ # objects.
1915
+ #
1916
+ # source://minitest//lib/minitest/test.rb#48
1917
+ def make_my_diffs_pretty!; end
1918
+
1919
+ # Call this at the top of your tests when you want to run your
1920
+ # tests in parallel. In doing so, you're admitting that you rule
1921
+ # and your tests are awesome.
1922
+ #
1923
+ # source://minitest//lib/minitest/test.rb#59
1924
+ def parallelize_me!; end
1925
+
1926
+ # Returns all instance methods starting with "test_". Based on
1927
+ # #test_order, the methods are either sorted, randomized
1928
+ # (default), or run in parallel.
1929
+ #
1930
+ # source://minitest//lib/minitest/test.rb#69
1931
+ def runnable_methods; end
1932
+
1933
+ # Defines the order to run tests (:random by default). Override
1934
+ # this or use a convenience method to change it for your tests.
1935
+ #
1936
+ # source://minitest//lib/minitest/test.rb#87
1937
+ def test_order; end
1938
+ end
1939
+ end
1940
+
1941
+ # Provides before/after hooks for setup and teardown. These are
1942
+ # meant for library writers, NOT for regular test authors. See
1943
+ # #before_setup for an example.
1944
+ #
1945
+ # source://minitest//lib/minitest/test.rb#121
1946
+ module Minitest::Test::LifecycleHooks
1947
+ # Runs before every test, after setup. This hook is meant for
1948
+ # libraries to extend minitest. It is not meant to be used by
1949
+ # test developers.
1950
+ #
1951
+ # See #before_setup for an example.
1952
+ #
1953
+ # source://minitest//lib/minitest/test.rb#171
1954
+ def after_setup; end
1955
+
1956
+ # Runs after every test, after teardown. This hook is meant for
1957
+ # libraries to extend minitest. It is not meant to be used by
1958
+ # test developers.
1959
+ #
1960
+ # See #before_setup for an example.
1961
+ #
1962
+ # source://minitest//lib/minitest/test.rb#195
1963
+ def after_teardown; end
1964
+
1965
+ # Runs before every test, before setup. This hook is meant for
1966
+ # libraries to extend minitest. It is not meant to be used by
1967
+ # test developers.
1968
+ #
1969
+ # As a simplistic example:
1970
+ #
1971
+ # module MyMinitestPlugin
1972
+ # def before_setup
1973
+ # super
1974
+ # # ... stuff to do before setup is run
1975
+ # end
1976
+ #
1977
+ # def after_setup
1978
+ # # ... stuff to do after setup is run
1979
+ # super
1980
+ # end
1981
+ #
1982
+ # def before_teardown
1983
+ # super
1984
+ # # ... stuff to do before teardown is run
1985
+ # end
1986
+ #
1987
+ # def after_teardown
1988
+ # # ... stuff to do after teardown is run
1989
+ # super
1990
+ # end
1991
+ # end
1992
+ #
1993
+ # class MiniTest::Test
1994
+ # include MyMinitestPlugin
1995
+ # end
1996
+ #
1997
+ # source://minitest//lib/minitest/test.rb#156
1998
+ def before_setup; end
1999
+
2000
+ # Runs after every test, before teardown. This hook is meant for
2001
+ # libraries to extend minitest. It is not meant to be used by
2002
+ # test developers.
2003
+ #
2004
+ # See #before_setup for an example.
2005
+ #
2006
+ # source://minitest//lib/minitest/test.rb#180
2007
+ def before_teardown; end
2008
+
2009
+ # Runs before every test. Use this to set up before each test
2010
+ # run.
2011
+ #
2012
+ # source://minitest//lib/minitest/test.rb#162
2013
+ def setup; end
2014
+
2015
+ # Runs after every test. Use this to clean up after each test
2016
+ # run.
2017
+ #
2018
+ # source://minitest//lib/minitest/test.rb#186
2019
+ def teardown; end
2020
+ end
2021
+
2022
+ # source://minitest//lib/minitest/test.rb#19
2023
+ Minitest::Test::PASSTHROUGH_EXCEPTIONS = T.let(T.unsafe(nil), Array)
2024
+
2025
+ # source://minitest//lib/minitest/test.rb#21
2026
+ Minitest::Test::SETUP_METHODS = T.let(T.unsafe(nil), Array)
2027
+
2028
+ # source://minitest//lib/minitest/test.rb#23
2029
+ Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array)
2030
+
2031
+ # Minitest::TestTask is a rake helper that generates several rake
2032
+ # tasks under the main test task's name-space.
2033
+ #
2034
+ # task <name> :: the main test task
2035
+ # task <name>:cmd :: prints the command to use
2036
+ # task <name>:deps :: runs each test file by itself to find dependency errors
2037
+ # task <name>:slow :: runs the tests and reports the slowest 25 tests.
2038
+ #
2039
+ # Examples:
2040
+ #
2041
+ # Minitest::TestTask.create
2042
+ #
2043
+ # The most basic and default setup.
2044
+ #
2045
+ # Minitest::TestTask.create :my_tests
2046
+ #
2047
+ # The most basic/default setup, but with a custom name
2048
+ #
2049
+ # Minitest::TestTask.create :unit do |t|
2050
+ # t.test_globs = ["test/unit/**/*_test.rb"]
2051
+ # t.warning = false
2052
+ # end
2053
+ #
2054
+ # Customize the name and only run unit tests.
2055
+ #
2056
+ # source://minitest//lib/minitest/test_task.rb#33
2057
+ class Minitest::TestTask < ::Rake::TaskLib
2058
+ # Use TestTask.create instead.
2059
+ #
2060
+ # @return [TestTask] a new instance of TestTask
2061
+ #
2062
+ # source://minitest//lib/minitest/test_task.rb#105
2063
+ def initialize(name = T.unsafe(nil)); end
2064
+
2065
+ # source://minitest//lib/minitest/test_task.rb#159
2066
+ def define; end
2067
+
2068
+ # Extra arguments to pass to the tests. Defaults empty but gets
2069
+ # populated by a number of enviroment variables:
2070
+ #
2071
+ # N (-n flag) :: a string or regexp of tests to run.
2072
+ # X (-e flag) :: a string or regexp of tests to exclude.
2073
+ # A (arg) :: quick way to inject an arbitrary argument (eg A=--help).
2074
+ #
2075
+ # See #process_env
2076
+ #
2077
+ # source://minitest//lib/minitest/test_task.rb#58
2078
+ def extra_args; end
2079
+
2080
+ # Extra arguments to pass to the tests. Defaults empty but gets
2081
+ # populated by a number of enviroment variables:
2082
+ #
2083
+ # N (-n flag) :: a string or regexp of tests to run.
2084
+ # X (-e flag) :: a string or regexp of tests to exclude.
2085
+ # A (arg) :: quick way to inject an arbitrary argument (eg A=--help).
2086
+ #
2087
+ # See #process_env
2088
+ #
2089
+ # source://minitest//lib/minitest/test_task.rb#58
2090
+ def extra_args=(_arg0); end
2091
+
2092
+ # The code to load the framework. Defaults to requiring
2093
+ # minitest/autorun...
2094
+ #
2095
+ # Why do I have this as an option?
2096
+ #
2097
+ # source://minitest//lib/minitest/test_task.rb#66
2098
+ def framework; end
2099
+
2100
+ # The code to load the framework. Defaults to requiring
2101
+ # minitest/autorun...
2102
+ #
2103
+ # Why do I have this as an option?
2104
+ #
2105
+ # source://minitest//lib/minitest/test_task.rb#66
2106
+ def framework=(_arg0); end
2107
+
2108
+ # Extra library directories to include. Defaults to %w[lib test
2109
+ # .]. Also uses $MT_LIB_EXTRAS allowing you to dynamically
2110
+ # override/inject directories for custom runs.
2111
+ #
2112
+ # source://minitest//lib/minitest/test_task.rb#73
2113
+ def libs; end
2114
+
2115
+ # Extra library directories to include. Defaults to %w[lib test
2116
+ # .]. Also uses $MT_LIB_EXTRAS allowing you to dynamically
2117
+ # override/inject directories for custom runs.
2118
+ #
2119
+ # source://minitest//lib/minitest/test_task.rb#73
2120
+ def libs=(_arg0); end
2121
+
2122
+ # Generate the test command-line.
2123
+ #
2124
+ # source://minitest//lib/minitest/test_task.rb#256
2125
+ def make_test_cmd(globs = T.unsafe(nil)); end
2126
+
2127
+ # The name of the task and base name for the other tasks generated.
2128
+ #
2129
+ # source://minitest//lib/minitest/test_task.rb#78
2130
+ def name; end
2131
+
2132
+ # The name of the task and base name for the other tasks generated.
2133
+ #
2134
+ # source://minitest//lib/minitest/test_task.rb#78
2135
+ def name=(_arg0); end
2136
+
2137
+ # Extract variables from the environment and convert them to
2138
+ # command line arguments. See #extra_args.
2139
+ #
2140
+ # Environment Variables:
2141
+ #
2142
+ # MT_LIB_EXTRAS :: Extra libs to dynamically override/inject for custom runs.
2143
+ # N :: Tests to run (string or /regexp/).
2144
+ # X :: Tests to exclude (string or /regexp/).
2145
+ # A :: Any extra arguments. Honors shell quoting.
2146
+ #
2147
+ # Deprecated:
2148
+ #
2149
+ # TESTOPTS :: For argument passing, use +A+.
2150
+ # N :: For parallel testing, use +MT_CPU+.
2151
+ # FILTER :: Same as +TESTOPTS+.
2152
+ #
2153
+ # source://minitest//lib/minitest/test_task.rb#134
2154
+ def process_env; end
2155
+
2156
+ # File globs to find test files. Defaults to something sensible to
2157
+ # find test files under the test directory.
2158
+ #
2159
+ # source://minitest//lib/minitest/test_task.rb#84
2160
+ def test_globs; end
2161
+
2162
+ # File globs to find test files. Defaults to something sensible to
2163
+ # find test files under the test directory.
2164
+ #
2165
+ # source://minitest//lib/minitest/test_task.rb#84
2166
+ def test_globs=(_arg0); end
2167
+
2168
+ # Optional: Additional ruby to run before the test framework is loaded.
2169
+ #
2170
+ # source://minitest//lib/minitest/test_task.rb#94
2171
+ def test_prelude; end
2172
+
2173
+ # Optional: Additional ruby to run before the test framework is loaded.
2174
+ #
2175
+ # source://minitest//lib/minitest/test_task.rb#94
2176
+ def test_prelude=(_arg0); end
2177
+
2178
+ # Print out commands as they run. Defaults to Rake's +trace+ (-t
2179
+ # flag) option.
2180
+ #
2181
+ # source://minitest//lib/minitest/test_task.rb#100
2182
+ def verbose; end
2183
+
2184
+ # Print out commands as they run. Defaults to Rake's +trace+ (-t
2185
+ # flag) option.
2186
+ #
2187
+ # source://minitest//lib/minitest/test_task.rb#100
2188
+ def verbose=(_arg0); end
2189
+
2190
+ # Turn on ruby warnings (-w flag). Defaults to true.
2191
+ #
2192
+ # source://minitest//lib/minitest/test_task.rb#89
2193
+ def warning; end
2194
+
2195
+ # Turn on ruby warnings (-w flag). Defaults to true.
2196
+ #
2197
+ # source://minitest//lib/minitest/test_task.rb#89
2198
+ def warning=(_arg0); end
2199
+
2200
+ class << self
2201
+ # Create several test-oriented tasks under +name+. Takes an
2202
+ # optional block to customize variables.
2203
+ #
2204
+ # source://minitest//lib/minitest/test_task.rb#40
2205
+ def create(name = T.unsafe(nil), &block); end
2206
+ end
2207
+ end
2208
+
2209
+ # source://minitest//lib/minitest/test_task.rb#34
2210
+ Minitest::TestTask::WINDOWS = T.let(T.unsafe(nil), T.untyped)
2211
+
2212
+ # Assertion wrapping an unexpected error that was raised during a run.
2213
+ #
2214
+ # source://minitest//lib/minitest.rb#933
2215
+ class Minitest::UnexpectedError < ::Minitest::Assertion
2216
+ # @return [UnexpectedError] a new instance of UnexpectedError
2217
+ #
2218
+ # source://minitest//lib/minitest.rb#937
2219
+ def initialize(error); end
2220
+
2221
+ # source://minitest//lib/minitest.rb#942
2222
+ def backtrace; end
2223
+
2224
+ # TODO: figure out how to use `cause` instead
2225
+ #
2226
+ # source://minitest//lib/minitest.rb#935
2227
+ def error; end
2228
+
2229
+ # TODO: figure out how to use `cause` instead
2230
+ #
2231
+ # source://minitest//lib/minitest.rb#935
2232
+ def error=(_arg0); end
2233
+
2234
+ # source://minitest//lib/minitest.rb#946
2235
+ def message; end
2236
+
2237
+ # source://minitest//lib/minitest.rb#951
2238
+ def result_label; end
2239
+ end
2240
+
2241
+ # source://minitest//lib/minitest/unit.rb#20
2242
+ class Minitest::Unit
2243
+ class << self
2244
+ # source://minitest//lib/minitest/unit.rb#36
2245
+ def after_tests(&b); end
2246
+
2247
+ # source://minitest//lib/minitest/unit.rb#30
2248
+ def autorun; end
2249
+ end
2250
+ end
2251
+
2252
+ # source://minitest//lib/minitest/unit.rb#22
2253
+ class Minitest::Unit::TestCase < ::Minitest::Test
2254
+ class << self
2255
+ # source://minitest//lib/minitest/unit.rb#23
2256
+ def inherited(klass); end
2257
+ end
2258
+ end
2259
+
2260
+ # source://minitest//lib/minitest/unit.rb#21
2261
+ Minitest::Unit::VERSION = T.let(T.unsafe(nil), String)
2262
+
2263
+ # source://minitest//lib/minitest.rb#12
2264
+ Minitest::VERSION = T.let(T.unsafe(nil), String)
2265
+
2266
+ # source://minitest//lib/minitest/mock.rb#1
2267
+ class MockExpectationError < ::StandardError; end
2268
+
2269
+ # source://minitest//lib/minitest/spec.rb#3
2270
+ class Module
2271
+ # source://minitest//lib/minitest/spec.rb#4
2272
+ def infect_an_assertion(meth, new_name, dont_flip = T.unsafe(nil)); end
2273
+ end
2274
+
2275
+ # source://activesupport/7.0.4/lib/active_support/core_ext/module/delegation.rb#13
2276
+ Module::DELEGATION_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array)
2277
+
2278
+ # source://activesupport/7.0.4/lib/active_support/core_ext/module/delegation.rb#14
2279
+ Module::DELEGATION_RESERVED_METHOD_NAMES = T.let(T.unsafe(nil), Set)
2280
+
2281
+ # source://activesupport/7.0.4/lib/active_support/core_ext/module/delegation.rb#10
2282
+ Module::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array)
2283
+
2284
+ # source://minitest//lib/minitest/spec.rb#347
2285
+ class Object < ::BasicObject
2286
+ include ::Kernel
2287
+ include ::PP::ObjectMixin
2288
+ include ::Minitest::Expectations
2289
+
2290
+ # Add a temporary stubbed method replacing +name+ for the duration
2291
+ # of the +block+. If +val_or_callable+ responds to #call, then it
2292
+ # returns the result of calling it, otherwise returns the value
2293
+ # as-is. If stubbed method yields a block, +block_args+ will be
2294
+ # passed along. Cleans up the stub at the end of the +block+. The
2295
+ # method +name+ must exist before stubbing.
2296
+ #
2297
+ # def test_stale_eh
2298
+ # obj_under_test = Something.new
2299
+ # refute obj_under_test.stale?
2300
+ #
2301
+ # Time.stub :now, Time.at(0) do
2302
+ # assert obj_under_test.stale?
2303
+ # end
2304
+ # end
2305
+ # --
2306
+ # NOTE: keyword args in callables are NOT checked for correctness
2307
+ # against the existing method. Too many edge cases to be worth it.
2308
+ #
2309
+ # source://minitest//lib/minitest/mock.rb#278
2310
+ def stub(name, val_or_callable, *block_args, **block_kwargs, &block); end
2311
+ end
2312
+
2313
+ # source://minitest//lib/minitest/test_task.rb#280
2314
+ class Work < ::Thread::Queue
2315
+ # @return [Work] a new instance of Work
2316
+ #
2317
+ # source://minitest//lib/minitest/test_task.rb#281
2318
+ def initialize(jobs = T.unsafe(nil)); end
2319
+ end