venture 0.0.1

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