wal 0.0.2 → 0.0.4

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