-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.rubocop_minitest.yml
More file actions
414 lines (360 loc) · 13.2 KB
/
Copy path.rubocop_minitest.yml
File metadata and controls
414 lines (360 loc) · 13.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
# Department 'Minitest' (55): 미수정
# Supports --autocorrect
Minitest/AssertEmpty:
Description: This cop enforces the test to use `assert_empty` instead of using `assert(object.empty?)`.
StyleGuide: https://minitest.rubystyle.guide#assert-empty
Enabled: false
VersionAdded: '0.2'
# Supports --autocorrect
Minitest/AssertEmptyLiteral:
Description: This cop enforces the test to use `assert_empty` instead of using `assert_equal([],
object)`.
Enabled: false
VersionAdded: '0.5'
VersionChanged: '0.11'
# Supports --autocorrect
Minitest/AssertEqual:
Description: This cop enforces the test to use `assert_equal` instead of using `assert(expected
== actual)`.
StyleGuide: https://minitest.rubystyle.guide#assert-equal-arguments-order
Enabled: false
VersionAdded: '0.4'
# Supports --autocorrect
Minitest/AssertInDelta:
Description: This cop enforces the test to use `assert_in_delta` instead of using
`assert_equal` to compare floats.
StyleGuide: https://minitest.rubystyle.guide/#assert-in-delta
Enabled: false
VersionAdded: '0.10'
# Supports --autocorrect
Minitest/AssertIncludes:
Description: This cop enforces the test to use `assert_includes` instead of using
`assert(collection.include?(object))`.
StyleGuide: https://minitest.rubystyle.guide#assert-includes
Enabled: false
VersionAdded: '0.2'
# Supports --autocorrect
Minitest/AssertInstanceOf:
Description: This cop enforces the test to use `assert_instance_of(Class, object)`
over `assert(object.instance_of?(Class))`
StyleGuide: https://minitest.rubystyle.guide#assert-instance-of
Enabled: false
VersionAdded: '0.4'
# Supports --autocorrect
Minitest/AssertKindOf:
Description: This cop enforces the test to use `assert_kind_of(Class, object)` over
`assert(object.kind_of?(Class))`
StyleGuide: https://github.com/rubocop/minitest-style-guide#assert-kind-of
Enabled: false
VersionAdded: '0.10'
VersionChanged: '0.34'
# Supports --autocorrect
Minitest/AssertMatch:
Description: This cop enforces the test to use `assert_match` instead of using `assert(matcher.match(object))`.
StyleGuide: https://minitest.rubystyle.guide#assert-match
Enabled: false
VersionAdded: '0.6'
# Supports --autocorrect
Minitest/AssertNil:
Description: This cop enforces the test to use `assert_nil` instead of using `assert_equal(nil,
something)` or `assert(something.nil?)`.
StyleGuide: https://minitest.rubystyle.guide#assert-nil
Enabled: false
VersionAdded: '0.1'
# Supports --autocorrect
Minitest/AssertOperator:
Description: This cop enforces the use of `assert_operator(expected, :<, actual)`
over `assert(expected < actual)`.
StyleGuide: https://minitest.rubystyle.guide#assert-operator
Enabled: false
VersionAdded: '0.32'
Minitest/AssertOutput:
Description: This cop checks for opportunities to use `assert_output`.
StyleGuide: https://minitest.rubystyle.guide/#assert-output
Enabled: false
VersionAdded: '0.10'
# Supports --autocorrect
Minitest/AssertPathExists:
Description: This cop enforces the test to use `assert_path_exists` instead of using
`assert(File.exist?(path))`.
StyleGuide: https://minitest.rubystyle.guide/#assert-path-exists
Enabled: false
VersionAdded: '0.10'
# Supports --autocorrect
Minitest/AssertPredicate:
Description: This cop enforces the test to use `assert_predicate` instead of using
`assert(obj.a_predicate_method?)`.
StyleGuide: https://minitest.rubystyle.guide/#assert-predicate
Enabled: false
VersionAdded: '0.18'
Minitest/AssertRaisesCompoundBody:
Description: This cop enforces the block body of `assert_raises { ... }` to be reduced
to only the raising code.
Enabled: false
VersionAdded: '0.21'
Minitest/AssertRaisesWithRegexpArgument:
Description: This cop enforces checks for regular expression literals passed to `assert_raises`.
Enabled: false
Severity: warning
VersionAdded: '0.22'
VersionChanged: '0.26'
# Supports --autocorrect
Minitest/AssertRespondTo:
Description: This cop enforces the test to use `assert_respond_to(object, :do_something)`
over `assert(object.respond_to?(:do_something))`.
StyleGuide: https://minitest.rubystyle.guide#assert-responds-to-method
Enabled: false
VersionAdded: '0.3'
# Supports --autocorrect
Minitest/AssertSame:
Description: Enforces the use of `assert_same(expected, actual)` over `assert(expected.equal?(actual))`.
StyleGuide: https://minitest.rubystyle.guide#assert-same
Enabled: false
VersionAdded: '0.26'
# Supports --autocorrect
Minitest/AssertSilent:
Description: This cop enforces the test to use `assert_silent { ... }` instead of
using `assert_output('', '') { ... }`.
StyleGuide: https://github.com/rubocop/minitest-style-guide#assert-silent
Enabled: false
VersionAdded: '0.10'
# Supports --autocorrect
Minitest/AssertTruthy:
Description: This cop enforces the test to use `assert(actual)` instead of using `assert_equal(true,
actual)`.
StyleGuide: https://minitest.rubystyle.guide#assert-truthy
Enabled: false
Safe: false
VersionAdded: '0.2'
VersionChanged: '0.27'
Minitest/AssertWithExpectedArgument:
Description: This cop tries to detect when a user accidentally used `assert` when
they meant to use `assert_equal`.
Enabled: false
Severity: warning
Safe: false
VersionAdded: '0.11'
VersionChanged: '0.26'
Minitest/AssertionInLifecycleHook:
Description: This cop checks for usage of assertions in lifecycle hooks.
Enabled: false
VersionAdded: '0.10'
Minitest/DuplicateTestRun:
Description: This cop detects duplicate test runs caused by one test class inheriting
from another.
StyleGuide: https://minitest.rubystyle.guide/#subclassing-test-cases
Enabled: false
VersionAdded: '0.19'
# Supports --autocorrect
Minitest/EmptyLineBeforeAssertionMethods:
Description: Add empty line before assertion methods.
Enabled: false
VersionAdded: '0.23'
# Supports --autocorrect
Minitest/Focus:
Description: Checks for focused tests.
Enabled: false
AutoCorrect: contextual
VersionAdded: '0.35'
# Supports --autocorrect
Minitest/GlobalExpectations:
Description: This cop checks for deprecated global expectations.
StyleGuide: https://minitest.rubystyle.guide#global-expectations
Enabled: false
Severity: warning
EnforcedStyle: any
Include:
- "**/test/**/*"
- "**/*_test.rb"
- "**/spec/**/*"
- "**/*_spec.rb"
SupportedStyles:
- _
- any
- expect
- value
VersionAdded: '0.7'
VersionChanged: '0.26'
# Supports --autocorrect
Minitest/LifecycleHooksOrder:
Description: Checks that lifecycle hooks are declared in the order in which they will
be executed.
StyleGuide: https://minitest.rubystyle.guide/#hooks-ordering
Enabled: false
VersionAdded: '0.28'
# Supports --autocorrect
Minitest/LiteralAsActualArgument:
Description: This cop enforces correct order of `expected` and `actual` arguments
for `assert_equal`.
StyleGuide: https://minitest.rubystyle.guide/#assert-equal-arguments-order
Enabled: false
VersionAdded: '0.10'
Minitest/MultipleAssertions:
Description: This cop checks if test cases contain too many assertion calls.
Enabled: false
VersionAdded: '0.10'
Max: 3
Minitest/NoAssertions:
Description: This cop checks for at least one assertion (or flunk) in tests.
Enabled: false
VersionAdded: '0.12'
Minitest/NoTestCases:
Description: Checks if test class contains any test cases.
Enabled: false
VersionAdded: '0.30'
Minitest/NonExecutableTestMethod:
Description: Checks uses of test methods outside test class.
Enabled: false
Severity: warning
VersionAdded: '0.34'
Minitest/NonPublicTestMethod:
Description: Detects non `public` (marked as `private` or `protected`) test methods.
Enabled: false
Severity: warning
VersionAdded: '0.27'
# Supports --autocorrect
Minitest/RedundantMessageArgument:
Description: Detects redundant message argument in assertion methods.
Enabled: false
VersionAdded: '0.34'
# Supports --autocorrect
Minitest/RefuteEmpty:
Description: This cop enforces to use `refute_empty` instead of using `refute(object.empty?)`.
StyleGuide: https://minitest.rubystyle.guide#refute-empty
Enabled: false
VersionAdded: '0.3'
# Supports --autocorrect
Minitest/RefuteEqual:
Description: Check if your test uses `refute_equal` instead of `assert(expected !=
object)` or `assert(! expected == object))`.
StyleGuide: https://minitest.rubystyle.guide#refute-equal
Enabled: false
VersionAdded: '0.3'
# Supports --autocorrect
Minitest/RefuteFalse:
Description: Check if your test uses `refute(actual)` instead of `assert_equal(false,
actual)`.
StyleGuide: https://minitest.rubystyle.guide#refute-false
Enabled: false
Safe: false
VersionAdded: '0.3'
VersionChanged: '0.27'
# Supports --autocorrect
Minitest/RefuteInDelta:
Description: This cop enforces the test to use `refute_in_delta` instead of using
`refute_equal` to compare floats.
StyleGuide: https://minitest.rubystyle.guide/#refute-in-delta
Enabled: false
VersionAdded: '0.10'
# Supports --autocorrect
Minitest/RefuteIncludes:
Description: This cop enforces the test to use `refute_includes` instead of using
`refute(collection.include?(object))`.
StyleGuide: https://minitest.rubystyle.guide#refute-includes
Enabled: false
VersionAdded: '0.3'
# Supports --autocorrect
Minitest/RefuteInstanceOf:
Description: This cop enforces the test to use `refute_instance_of(Class, object)`
over `refute(object.instance_of?(Class))`.
StyleGuide: https://minitest.rubystyle.guide#refute-instance-of
Enabled: false
VersionAdded: '0.4'
# Supports --autocorrect
Minitest/RefuteKindOf:
Description: This cop enforces the test to use `refute_kind_of(Class, object)` over
`refute(object.kind_of?(Class))`.
StyleGuide: https://github.com/rubocop/minitest-style-guide#refute-kind-of
Enabled: false
VersionAdded: '0.10'
VersionChanged: '0.34'
# Supports --autocorrect
Minitest/RefuteMatch:
Description: This cop enforces the test to use `refute_match` instead of using `refute(matcher.match(object))`.
StyleGuide: https://minitest.rubystyle.guide#refute-match
Enabled: false
VersionAdded: '0.6'
# Supports --autocorrect
Minitest/RefuteNil:
Description: This cop enforces the test to use `refute_nil` instead of using `refute_equal(nil,
something)` or `refute(something.nil?)`.
StyleGuide: https://minitest.rubystyle.guide#refute-nil
Enabled: false
VersionAdded: '0.2'
# Supports --autocorrect
Minitest/RefuteOperator:
Description: This cop enforces the use of `refute_operator(expected, :<, actual)`
over `refute(expected < actual)`.
StyleGuide: https://minitest.rubystyle.guide#refute-operator
Enabled: false
VersionAdded: '0.32'
# Supports --autocorrect
Minitest/RefutePathExists:
Description: This cop enforces the test to use `refute_path_exists` instead of using
`refute(File.exist?(path))`.
StyleGuide: https://minitest.rubystyle.guide/#refute-path-exists
Enabled: false
VersionAdded: '0.10'
# Supports --autocorrect
Minitest/RefutePredicate:
Description: This cop enforces the test to use `refute_predicate` instead of using
`refute(obj.a_predicate_method?)`.
StyleGuide: https://minitest.rubystyle.guide/#refute-predicate
Enabled: false
VersionAdded: '0.18'
# Supports --autocorrect
Minitest/RefuteRespondTo:
Description: This cop enforces the test to use `refute_respond_to(object, :do_something)`
over `refute(object.respond_to?(:do_something))`.
StyleGuide: https://minitest.rubystyle.guide#refute-respond-to
Enabled: false
VersionAdded: '0.4'
# Supports --autocorrect
Minitest/RefuteSame:
Description: Enforces the use of `refute_same(expected, actual)` over `refute(expected.equal?(actual))`.
StyleGuide: https://minitest.rubystyle.guide#refute-same
Enabled: false
VersionAdded: '0.26'
# Supports --autocorrect
Minitest/ReturnInTestMethod:
Description: Enforces the use of `skip` instead of `return` in test methods.
StyleGuide: https://minitest.rubystyle.guide/#skipping-runnable-methods
Enabled: false
VersionAdded: '0.31'
Minitest/SkipEnsure:
Description: Checks that `ensure` call even if `skip`.
Enabled: false
Severity: warning
VersionAdded: '0.20'
VersionChanged: '0.26'
Minitest/SkipWithoutReason:
Description: Checks for skipped tests missing the skipping reason.
Enabled: false
VersionAdded: '0.24'
Minitest/TestFileName:
Description: Checks if test file names start with `test_` or end with `_test.rb`.
StyleGuide: https://minitest.rubystyle.guide/#file-naming
Enabled: false
VersionAdded: '0.26'
# Supports --autocorrect
Minitest/TestMethodName:
Description: This cop enforces that test method names start with `test_` prefix.
Enabled: false
VersionAdded: '0.10'
Minitest/UnreachableAssertion:
Description: This cop checks for an `assert_raises` block containing any unreachable
assertions.
Enabled: false
Severity: warning
VersionAdded: '0.14'
VersionChanged: '0.26'
Minitest/UnspecifiedException:
Description: This cop checks for a specified error in `assert_raises`.
StyleGuide: https://minitest.rubystyle.guide#unspecified-exception
Enabled: false
VersionAdded: '0.10'
Minitest/UselessAssertion:
Description: Detects useless assertions (assertions that either always pass or always
fail).
Enabled: false
VersionAdded: '0.26'