openfeature-sdk-sorbet 0.1.0

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