rails_type_id 0.1.0

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