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