rubocop-minitest 0.21.1 → 0.22.1
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 +4 -4
- data/config/default.yml +5 -0
- data/lib/rubocop/cop/minitest/assert_match.rb +1 -1
- data/lib/rubocop/cop/minitest/assert_raises_with_regexp_argument.rb +36 -0
- data/lib/rubocop/cop/minitest_cops.rb +1 -0
- data/lib/rubocop/cop/mixin/argument_range_helper.rb +1 -0
- data/lib/rubocop/cop/mixin/in_delta_mixin.rb +1 -0
- data/lib/rubocop/cop/mixin/minitest_cop_rule.rb +13 -5
- data/lib/rubocop/cop/mixin/minitest_exploration_helpers.rb +1 -0
- data/lib/rubocop/cop/mixin/nil_assertion_handleable.rb +1 -0
- data/lib/rubocop/cop/mixin/predicate_assertion_handleable.rb +1 -0
- data/lib/rubocop/minitest/version.rb +1 -1
- metadata +4 -81
- data/.circleci/config.yml +0 -55
- data/.gitattributes +0 -1
- data/.github/FUNDING.yml +0 -7
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -43
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -17
- data/.github/workflows/linting.yml +0 -15
- data/.github/workflows/spell_checking.yml +0 -33
- data/.gitignore +0 -61
- data/.rubocop.yml +0 -110
- data/.rubocop_todo.yml +0 -19
- data/.yamllint.yml +0 -9
- data/.yardopts +0 -3
- data/CHANGELOG.md +0 -336
- data/CONTRIBUTING.md +0 -69
- data/Gemfile +0 -16
- data/Rakefile +0 -56
- data/bin/console +0 -11
- data/bin/setup +0 -8
- data/codespell.txt +0 -0
- data/docs/antora.yml +0 -7
- data/docs/modules/ROOT/nav.adoc +0 -6
- data/docs/modules/ROOT/pages/cops.adoc +0 -56
- data/docs/modules/ROOT/pages/cops_minitest.adoc +0 -1450
- data/docs/modules/ROOT/pages/index.adoc +0 -5
- data/docs/modules/ROOT/pages/installation.adoc +0 -15
- data/docs/modules/ROOT/pages/usage.adoc +0 -32
- data/legacy-docs/cops.md +0 -23
- data/legacy-docs/cops_minitest.md +0 -448
- data/legacy-docs/index.md +0 -1
- data/legacy-docs/installation.md +0 -11
- data/legacy-docs/usage.md +0 -27
- data/mkdocs.yml +0 -13
- data/readthedocs.yml +0 -5
- data/relnotes/v0.1.0.md +0 -7
- data/relnotes/v0.10.0.md +0 -21
- data/relnotes/v0.10.1.md +0 -5
- data/relnotes/v0.10.2.md +0 -5
- data/relnotes/v0.10.3.md +0 -5
- data/relnotes/v0.11.0.md +0 -16
- data/relnotes/v0.11.1.md +0 -5
- data/relnotes/v0.12.0.md +0 -10
- data/relnotes/v0.12.1.md +0 -5
- data/relnotes/v0.13.0.md +0 -5
- data/relnotes/v0.14.0.md +0 -5
- data/relnotes/v0.15.0.md +0 -5
- data/relnotes/v0.15.1.md +0 -5
- data/relnotes/v0.15.2.md +0 -5
- data/relnotes/v0.16.0.md +0 -11
- data/relnotes/v0.17.0.md +0 -5
- data/relnotes/v0.17.1.md +0 -5
- data/relnotes/v0.17.2.md +0 -5
- data/relnotes/v0.18.0.md +0 -9
- data/relnotes/v0.19.0.md +0 -5
- data/relnotes/v0.19.1.md +0 -5
- data/relnotes/v0.2.0.md +0 -9
- data/relnotes/v0.2.1.md +0 -5
- data/relnotes/v0.20.0.md +0 -13
- data/relnotes/v0.20.1.md +0 -5
- data/relnotes/v0.21.0.md +0 -5
- data/relnotes/v0.21.1.md +0 -5
- data/relnotes/v0.3.0.md +0 -16
- data/relnotes/v0.4.0.md +0 -14
- data/relnotes/v0.4.1.md +0 -5
- data/relnotes/v0.5.0.md +0 -5
- data/relnotes/v0.5.1.md +0 -5
- data/relnotes/v0.6.0.md +0 -5
- data/relnotes/v0.6.1.md +0 -6
- data/relnotes/v0.6.2.md +0 -5
- data/relnotes/v0.7.0.md +0 -13
- data/relnotes/v0.8.0.md +0 -12
- data/relnotes/v0.8.1.md +0 -5
- data/relnotes/v0.9.0.md +0 -10
- data/rubocop-minitest.gemspec +0 -40
- data/tasks/changelog.rake +0 -34
- data/tasks/changelog.rb +0 -166
- data/tasks/cops_documentation.rake +0 -50
- data/tasks/cut_release.rake +0 -86
data/.rubocop_todo.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2020-10-29 02:01:16 UTC using RuboCop version 1.0.0.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 22
|
10
|
-
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
|
11
|
-
Metrics/MethodLength:
|
12
|
-
Max: 14
|
13
|
-
Exclude:
|
14
|
-
- 'test/rubocop/cop/minitest/global_expectations_test.rb'
|
15
|
-
|
16
|
-
# Offense count: 1
|
17
|
-
Style/DocumentDynamicEvalDefinition:
|
18
|
-
Exclude:
|
19
|
-
- 'lib/rubocop/cop/mixin/minitest_cop_rule.rb'
|
data/.yamllint.yml
DELETED
data/.yardopts
DELETED
data/CHANGELOG.md
DELETED
@@ -1,336 +0,0 @@
|
|
1
|
-
# Change log
|
2
|
-
|
3
|
-
## master (unreleased)
|
4
|
-
|
5
|
-
## 0.21.1 (2022-08-28)
|
6
|
-
|
7
|
-
### Bug fixes
|
8
|
-
|
9
|
-
* [#178](https://github.com/rubocop/rubocop-minitest/pull/178): Fix incorrect documentation URLs when using `rubocop --show-docs-url`. ([@r7kamura][])
|
10
|
-
|
11
|
-
## 0.21.0 (2022-07-31)
|
12
|
-
|
13
|
-
### New features
|
14
|
-
|
15
|
-
* [#109](https://github.com/rubocop/rubocop-minitest/issues/109): Add new `Minitest/AssertRaisesCompoundBody` cop. ([@fatkodima][])
|
16
|
-
|
17
|
-
## 0.20.1 (2022-06-13)
|
18
|
-
|
19
|
-
### Bug fixes
|
20
|
-
|
21
|
-
* [#175](https://github.com/rubocop/rubocop-minitest/pull/175): Fix raise error when using assert with block. ([@ippachi][])
|
22
|
-
|
23
|
-
## 0.20.0 (2022-05-29)
|
24
|
-
|
25
|
-
### New features
|
26
|
-
|
27
|
-
* [#169](https://github.com/rubocop/rubocop-minitest/issues/169): Add new `Minitest/SkipEnsure` cop. ([@koic][])
|
28
|
-
|
29
|
-
### Bug fixes
|
30
|
-
|
31
|
-
* [#172](https://github.com/rubocop/rubocop-minitest/issues/172): Fix a false positive for `Minitest/AssertPredicate` and `Minitest/RefutePredicate` when using numbered parameters. ([@koic][])
|
32
|
-
|
33
|
-
### Changes
|
34
|
-
|
35
|
-
* [#168](https://github.com/rubocop/rubocop-minitest/pull/168): **(Compatibility)** Drop Ruby 2.5 support. ([@koic][])
|
36
|
-
|
37
|
-
## 0.19.1 (2022-04-10)
|
38
|
-
|
39
|
-
### Bug fixes
|
40
|
-
|
41
|
-
* [#167](https://github.com/rubocop/rubocop-minitest/pull/167): Fix potential for valid Ruby code to be unparsable in `Minitest/DuplicateTestRun` cop. ([@gjtorikian][])
|
42
|
-
|
43
|
-
## 0.19.0 (2022-04-05)
|
44
|
-
|
45
|
-
### New features
|
46
|
-
|
47
|
-
* [#164](https://github.com/rubocop/rubocop-minitest/pull/164): Add new `Minitest/DuplicateTestRun` cop. ([@ignacio-chiazzo][])
|
48
|
-
|
49
|
-
## 0.18.0 (2022-03-13)
|
50
|
-
|
51
|
-
### New features
|
52
|
-
|
53
|
-
* [#161](https://github.com/rubocop/rubocop-minitest/pull/161): Add new `Minitest/AssertPredicate` and `Minitest/RefutePredicate` cops. ([@koic][])
|
54
|
-
|
55
|
-
### Changes
|
56
|
-
|
57
|
-
* [#162](https://github.com/rubocop/rubocop-minitest/pull/162): Make `Minitest/AssertNil` (`Minitest/RefuteNil`) aware of `assert_predicate(obj, :nil?)` (`refute_predicate(obj, :nil?)`). ([@koic][])
|
58
|
-
|
59
|
-
## 0.17.2 (2022-02-12)
|
60
|
-
|
61
|
-
### Bug fixes
|
62
|
-
|
63
|
-
* [#159](https://github.com/rubocop/rubocop-minitest/issues/159): Fix a false positive for `Minitest/UnreachableAssertion` when using only one assertion method in `assert_raises` block. ([@koic][])
|
64
|
-
|
65
|
-
## 0.17.1 (2022-01-30)
|
66
|
-
|
67
|
-
### Changes
|
68
|
-
|
69
|
-
* [#158](https://github.com/rubocop/rubocop-minitest/pull/158): Make `Minitest/UnreachableAssertion` aware of `assert` and `refute` prefix methods. ([@koic][])
|
70
|
-
|
71
|
-
## 0.17.0 (2021-11-23)
|
72
|
-
|
73
|
-
### New features
|
74
|
-
|
75
|
-
* [#155](https://github.com/rubocop/rubocop-minitest/issues/155): Provide `assert_offense`, `assert_correction`, and `assert_no_offenses` testing APIs for custom Minitest cop development. ([@koic][])
|
76
|
-
|
77
|
-
## 0.16.0 (2021-11-14)
|
78
|
-
|
79
|
-
### New features
|
80
|
-
|
81
|
-
* [#147](https://github.com/rubocop/rubocop-minitest/issues/147): Add `EnforcedStyle` config parameter for `Minitest/GlobalExpectations`. ([@gi][])
|
82
|
-
|
83
|
-
### Bug fixes
|
84
|
-
|
85
|
-
* [#142](https://github.com/rubocop/rubocop-minitest/issues/142): Fix `Minitest/GlobalExpectations` autocorrect when receiver is lambda. ([@gi][])
|
86
|
-
* [#150](https://github.com/rubocop/rubocop-minitest/issues/150): Fix a false positive for `Minitest/AssertEmpty` and `RefuteEmpty` cops when using `empty` method with any arguments. ([@koic][])
|
87
|
-
|
88
|
-
## 0.15.2 (2021-10-11)
|
89
|
-
|
90
|
-
### Bug fixes
|
91
|
-
|
92
|
-
* [#145](https://github.com/rubocop/rubocop-minitest/pull/145): Mark `Minitest/AssertEmptyLiteral` as safe autocorrection. ([@koic][])
|
93
|
-
|
94
|
-
## 0.15.1 (2021-09-26)
|
95
|
-
|
96
|
-
### Bug fixes
|
97
|
-
|
98
|
-
* [#143](https://github.com/rubocop/rubocop-minitest/issues/143): Fix an error for `Minitest/LiteralAsActualArgumentTest` when expected and actual arguments are literals. ([@koic][])
|
99
|
-
|
100
|
-
## 0.15.0 (2021-08-09)
|
101
|
-
|
102
|
-
### New features
|
103
|
-
|
104
|
-
* [#140](https://github.com/rubocop/rubocop-minitest/issues/140): Make `Minitest/AssertNil` and `Minitest/RefuteNil` aware of `assert(obj.nil?)` and `refute(obj.nil?)`. ([@koic][])
|
105
|
-
|
106
|
-
## 0.14.0 (2021-07-03)
|
107
|
-
|
108
|
-
### New features
|
109
|
-
|
110
|
-
* [#133](https://github.com/rubocop/rubocop-minitest/issues/133): Add new `Minitest/UnreachableAssertion` cop. ([@koic][])
|
111
|
-
|
112
|
-
## 0.13.0 (2021-06-20)
|
113
|
-
|
114
|
-
### New features
|
115
|
-
|
116
|
-
* [#136](https://github.com/rubocop/rubocop-minitest/pull/136): Support Active Support's `test` method for `Minitest/MultipleAssertions` and `Minitest/NoAssertions` cops. ([@koic][])
|
117
|
-
|
118
|
-
## 0.12.1 (2021-04-25)
|
119
|
-
|
120
|
-
### Bug fixes
|
121
|
-
|
122
|
-
* [#131](https://github.com/rubocop/rubocop-minitest/issues/131): Fix an error for `Minitest/MultipleAssertions` and fixes a false positive for `test` block. ([@koic][])
|
123
|
-
|
124
|
-
## 0.12.0 (2021-04-23)
|
125
|
-
|
126
|
-
### New features
|
127
|
-
|
128
|
-
* [#124](https://github.com/rubocop/rubocop-minitest/pull/124): Add new `Minitest/NoAssertions` cop. ([@ghiculescu][])
|
129
|
-
|
130
|
-
### Changes
|
131
|
-
|
132
|
-
* [#129](https://github.com/rubocop/rubocop-minitest/pull/129): **(Compatibility)** Drop Ruby 2.4 support. ([@koic][])
|
133
|
-
|
134
|
-
## 0.11.1 (2021-03-31)
|
135
|
-
|
136
|
-
### Changes
|
137
|
-
|
138
|
-
* [#126](https://github.com/rubocop/rubocop-minitest/issues/126): Mark `Minitest/AssertWithExpectedArgument` as unsafe. ([@koic][])
|
139
|
-
|
140
|
-
## 0.11.0 (2021-03-22)
|
141
|
-
|
142
|
-
### New features
|
143
|
-
|
144
|
-
* [#117](https://github.com/rubocop/rubocop-minitest/issues/117): Add new cop `Minitest/AssertWithExpectedArgument` to check for unintended usages of `assert` instead of `assert_equal`. ([@cstyles][])
|
145
|
-
|
146
|
-
### Bug fixes
|
147
|
-
|
148
|
-
* [#122](https://github.com/rubocop/rubocop-minitest/pull/122): Fix `Minitest/TestMethodName` for tests with multiple assertions. ([@ghiculescu][])
|
149
|
-
|
150
|
-
### Changes
|
151
|
-
|
152
|
-
* [#118](https://github.com/rubocop/rubocop-minitest/pull/118): **(BREAKING)** Fix `Minitest/AssertEmptyLiteral` by making it check for `assert_equal([], array)` instead of `assert([], array)`. ([@cstyles][])
|
153
|
-
* [#125](https://github.com/rubocop/rubocop-minitest/pull/125): Require RuboCop 0.90 or higher. ([@koic][])
|
154
|
-
|
155
|
-
## 0.10.3 (2021-01-12)
|
156
|
-
|
157
|
-
### Bug fixes
|
158
|
-
|
159
|
-
* [#115](https://github.com/rubocop/rubocop-minitest/issues/115): Fix a false positive for `Minitest/TestMethodName` for when defining test method has an argument, and test method without assertion methods. ([@koic][])
|
160
|
-
|
161
|
-
## 0.10.2 (2020-12-27)
|
162
|
-
|
163
|
-
### Bug fixes
|
164
|
-
|
165
|
-
* [#113](https://github.com/rubocop/rubocop-minitest/issues/113): Fix an error for `Minitest/AssertEqual` and some cops when using `assert` with block argument. ([@koic][])
|
166
|
-
|
167
|
-
## 0.10.1 (2020-07-25)
|
168
|
-
|
169
|
-
### Bug fixes
|
170
|
-
|
171
|
-
* [#106](https://github.com/rubocop/rubocop-minitest/issues/106): Fix an error for `Minitest/AssertOutput` when using gvar at top level. ([@koic][])
|
172
|
-
|
173
|
-
## 0.10.0 (2020-07-12)
|
174
|
-
|
175
|
-
### New features
|
176
|
-
|
177
|
-
* [#92](https://github.com/rubocop/rubocop-minitest/pull/92): Add new `Minitest/LiteralAsActualArgument` cop. ([@fatkodima][], [@tsmmark][])
|
178
|
-
* [#95](https://github.com/rubocop/rubocop-minitest/pull/95): Add new `Minitest/AssertionInLifecycleHook` cop. ([@fatkodima][])
|
179
|
-
* [#91](https://github.com/rubocop/rubocop-minitest/pull/91): Add new `Minitest/AssertInDelta` and `Minitest/RefuteInDelta` cops. ([@fatkodima][])
|
180
|
-
* [#89](https://github.com/rubocop/rubocop-minitest/pull/89): Add new `Minitest/TestMethodName` cop. ([@fatkodima][])
|
181
|
-
* [#83](https://github.com/rubocop/rubocop-minitest/pull/83): New cops `AssertPathExists` and `RefutePathExists` check for use of `assert_path_exists`/`refute_path_exists` instead of `assert(File.exist?(path))`/`refute(File.exist?(path))`. ([@fatkodima][])
|
182
|
-
* [#88](https://github.com/rubocop/rubocop-minitest/pull/88): Add new `Minitest/MultipleAssertions` cop. ([@fatkodima][])
|
183
|
-
* [#87](https://github.com/rubocop/rubocop-minitest/pull/87): Add new `Minitest/AssertSilent` cop. ([@fatkodima][])
|
184
|
-
* [#96](https://github.com/rubocop/rubocop-minitest/pull/96): Add new `Minitest/UnspecifiedException` cop. ([@fatkodima][])
|
185
|
-
* [#98](https://github.com/rubocop/rubocop-minitest/pull/98): Add new `Minitest/AssertOutput` cop. ([@fatkodima][])
|
186
|
-
* [#84](https://github.com/rubocop/rubocop-minitest/pull/84): New cops `AssertKindOf` and `RefuteKindOf` check for use of `assert_kind_of`/`refute_kind_of` instead of `assert(foo.kind_of?(Class))`/`refute(foo.kind_of?(Class))`. ([@fatkodima][])
|
187
|
-
* [#85](https://github.com/rubocop/rubocop-minitest/pull/85): Add autocorrect to `Rails/AssertEmptyLiteral` cop. ([@fatkodima][])
|
188
|
-
|
189
|
-
### Changes
|
190
|
-
|
191
|
-
* [#104](https://github.com/rubocop/rubocop-minitest/pull/104): Require RuboCop 0.87 or higher. ([@koic][])
|
192
|
-
|
193
|
-
## 0.9.0 (2020-04-13)
|
194
|
-
|
195
|
-
### Bug fixes
|
196
|
-
|
197
|
-
* [#75](https://github.com/rubocop/rubocop-minitest/issues/75): Fix a false negative for `Minitest/GlobalExpectations` when using global expectation methods with no arguments. ([@koic][])
|
198
|
-
|
199
|
-
### Changes
|
200
|
-
|
201
|
-
* [#73](https://github.com/rubocop/rubocop-minitest/issues/73): The Minitest department works on file names end with `_test.rb` by default. ([@koic][])
|
202
|
-
* [#77](https://github.com/rubocop/rubocop-minitest/pull/77): **(Compatibility)** Drop support for Ruby 2.3. ([@koic][])
|
203
|
-
|
204
|
-
## 0.8.1 (2020-04-06)
|
205
|
-
|
206
|
-
### Bug fixes
|
207
|
-
|
208
|
-
* [#72](https://github.com/rubocop/rubocop-minitest/pull/72): Fix some false negatives for `Minitest/GlobalExpectations`. ([@andrykonchin][])
|
209
|
-
|
210
|
-
## 0.8.0 (2020-03-24)
|
211
|
-
|
212
|
-
### New features
|
213
|
-
|
214
|
-
* [#66](https://github.com/rubocop/rubocop-minitest/issues/66): Support all expectations of `Minitest::Expectations` for `Minitest/GlobalExpectations` cop. ([@koic][])
|
215
|
-
|
216
|
-
### Bug fixes
|
217
|
-
|
218
|
-
* [#60](https://github.com/rubocop/rubocop-minitest/issues/60): Fix `Minitest/GlobalExpectations` autocorrection for chained methods. ([@tejasbubane][])
|
219
|
-
* [#69](https://github.com/rubocop/rubocop-minitest/pull/69): Fix a false negative for `Minitest/GlobalExpectations` cop when using a variable or a hash index for receiver. ([@koic][])
|
220
|
-
* [#71](https://github.com/rubocop/rubocop-minitest/pull/71): Fix a false negative for `Minitest/AssertEqual` when an argument is enclosed in redundant parentheses. ([@koic][])
|
221
|
-
|
222
|
-
## 0.7.0 (2020-03-09)
|
223
|
-
|
224
|
-
### New features
|
225
|
-
|
226
|
-
* [#60](https://github.com/rubocop/rubocop-minitest/issues/60): Add new cop `Minitest/GlobalExpectations` to check for deprecated global expectations. ([@tejasbubane][])
|
227
|
-
|
228
|
-
### Bug fixes
|
229
|
-
|
230
|
-
* [#58](https://github.com/rubocop/rubocop-minitest/pull/58): Fix a false negative for `Minitest/AssertMatch` and `Minitest/RefuteMatch` when an argument is enclosed in redundant parentheses. ([@koic][])
|
231
|
-
* [#59](https://github.com/rubocop/rubocop-minitest/pull/59): Fix a false negative for `Minitest/AssertRespondTo` and `Minitest/RefuteRespondTo` when an argument is enclosed in redundant parentheses. ([@koic][])
|
232
|
-
* [#61](https://github.com/rubocop/rubocop-minitest/pull/61): Fix a false negative for `Minitest/AssertInstanceOf` and `Minitest/RefuteInstanceOf` when an argument is enclosed in redundant parentheses. ([@koic][])
|
233
|
-
* [#62](https://github.com/rubocop/rubocop-minitest/pull/62): Fix a false negative for `Minitest/AssertEmpty` and `Minitest/RefuteEmpty` when an argument is enclosed in redundant parentheses. ([@koic][])
|
234
|
-
|
235
|
-
## 0.6.2 (2020-02-19)
|
236
|
-
|
237
|
-
### Bug fixes
|
238
|
-
|
239
|
-
* [#55](https://github.com/rubocop/rubocop-minitest/issues/55): Fix an error for `Minitest/AssertIncludes` when using local variable argument. ([@koic][])
|
240
|
-
|
241
|
-
## 0.6.1 (2020-02-18)
|
242
|
-
|
243
|
-
### Bug fixes
|
244
|
-
|
245
|
-
* [#52](https://github.com/rubocop/rubocop-minitest/issues/52): Make `Minitest/RefuteFalse` cop aware of `assert(!test)`. ([@koic][])
|
246
|
-
* [#52](https://github.com/rubocop/rubocop-minitest/issues/52): Fix a false negative for `Minitest/AssertIncludes` and `Minitest/RefuteIncludes` when an argument is enclosed in redundant parentheses. ([@koic][])
|
247
|
-
|
248
|
-
## 0.6.0 (2020-02-07)
|
249
|
-
|
250
|
-
### New features
|
251
|
-
|
252
|
-
* [#49](https://github.com/rubocop/rubocop-minitest/pull/49): New cops `AssertMatch` and `RefuteMatch` check for use of `assert_match`/`refute_match` instead of `assert(foo.match(bar))`/`refute(foo.match(bar))`. ([@fsateler][])
|
253
|
-
|
254
|
-
## 0.5.1 (2019-12-25)
|
255
|
-
|
256
|
-
### Bug fixes
|
257
|
-
|
258
|
-
* [#42](https://github.com/rubocop/rubocop-minitest/issues/42): Fix an incorrect autocorrect for some cops of `Minitest` department when using heredoc message. ([@koic][])
|
259
|
-
|
260
|
-
## 0.5.0 (2019-11-24)
|
261
|
-
|
262
|
-
### New features
|
263
|
-
|
264
|
-
* [#32](https://github.com/rubocop/rubocop-minitest/issues/32): Add new `Minitest/AssertEmptyLiteral` cop. ([@tejasbubane][])
|
265
|
-
|
266
|
-
## 0.4.1 (2019-11-10)
|
267
|
-
|
268
|
-
### Bug fixes
|
269
|
-
|
270
|
-
* [#39](https://github.com/rubocop/rubocop-minitest/issues/39): Fix an incorrect autocorrect for `Minitest/AssertRespondTo` and `Minitest/RefuteRespondTo` when using assertion method calling `respond_to` with receiver omitted. ([@koic][])
|
271
|
-
|
272
|
-
## 0.4.0 (2019-11-07)
|
273
|
-
|
274
|
-
### New features
|
275
|
-
|
276
|
-
* [#29](https://github.com/rubocop/rubocop-minitest/pull/29): Add new `Minitest/RefuteRespondTo` cop. ([@herwinw][])
|
277
|
-
* [#31](https://github.com/rubocop/rubocop-minitest/pull/31): Add new `Minitest/AssertEqual` cop. ([@herwinw][])
|
278
|
-
* [#34](https://github.com/rubocop/rubocop-minitest/pull/34): Add new `Minitest/AssertInstanceOf` cop. ([@abhaynikam][])
|
279
|
-
* [#35](https://github.com/rubocop/rubocop-minitest/pull/35): Add new `Minitest/RefuteInstanceOf` cop. ([@abhaynikam][])
|
280
|
-
|
281
|
-
### Bug fixes
|
282
|
-
|
283
|
-
* [#25](https://github.com/rubocop/rubocop-minitest/issues/25): Add `Enabled: true` to `Minitest` department config to suppress `Warning: Minitest does not support Enabled parameter`. ([@koic][])
|
284
|
-
|
285
|
-
## 0.3.0 (2019-10-13)
|
286
|
-
|
287
|
-
### New features
|
288
|
-
|
289
|
-
* [#15](https://github.com/rubocop/rubocop-minitest/pull/15): Add new `Minitest/RefuteIncludes` cop. ([@abhaynikam][])
|
290
|
-
* [#18](https://github.com/rubocop/rubocop-minitest/pull/18): Add new `Minitest/RefuteFalse` cop. ([@duduribeiro][])
|
291
|
-
* [#20](https://github.com/rubocop/rubocop-minitest/pull/20): Add new `Minitest/RefuteEmpty` cop. ([@abhaynikam][])
|
292
|
-
* [#21](https://github.com/rubocop/rubocop-minitest/pull/21): Add new `Minitest/RefuteEqual` cop. ([@duduribeiro][])
|
293
|
-
* [#27](https://github.com/rubocop/rubocop-minitest/pull/27): Add new `Minitest/AssertRespondTo` cop. ([@duduribeiro][])
|
294
|
-
|
295
|
-
### Bug fixes
|
296
|
-
|
297
|
-
* [#19](https://github.com/rubocop/rubocop-minitest/pull/19): Fix a false negative for `Minitest/AssertIncludes` when using `include` method in arguments of `assert` method. ([@abhaynikam][])
|
298
|
-
|
299
|
-
## 0.2.1 (2019-09-24)
|
300
|
-
|
301
|
-
### Bug fixes
|
302
|
-
|
303
|
-
* [#13](https://github.com/rubocop/rubocop-minitest/issues/13): Fix the execution target specified in `Include` parameter. ([@koic][])
|
304
|
-
|
305
|
-
## 0.2.0 (2019-09-21)
|
306
|
-
|
307
|
-
### New features
|
308
|
-
|
309
|
-
* [#11](https://github.com/rubocop/rubocop-minitest/pull/11): Add new `Minitest/RefuteNil` cop. ([@tejasbubane][])
|
310
|
-
* [#8](https://github.com/rubocop/rubocop-minitest/pull/8): Add new `Minitest/AssertTruthy` cop. ([@abhaynikam][])
|
311
|
-
* [#9](https://github.com/rubocop/rubocop-minitest/pull/9): Add new `Minitest/AssertIncludes` cop. ([@abhaynikam][])
|
312
|
-
* [#10](https://github.com/rubocop/rubocop-minitest/pull/10): Add new `Minitest/AssertEmpty` cop. ([@abhaynikam][])
|
313
|
-
|
314
|
-
## 0.1.0 (2019-09-01)
|
315
|
-
|
316
|
-
### New features
|
317
|
-
|
318
|
-
* Create RuboCop Minitest gem. ([@koic][])
|
319
|
-
* [#6](https://github.com/rubocop/rubocop-minitest/pull/6): Add new `Minitest/AssertNil` cop. ([@duduribeiro][])
|
320
|
-
|
321
|
-
[@koic]: https://github.com/koic
|
322
|
-
[@duduribeiro]: https://github.com/duduribeiro
|
323
|
-
[@tejasbubane]: https://github.com/tejasbubane
|
324
|
-
[@abhaynikam]: https://github.com/abhaynikam
|
325
|
-
[@herwinw]: https://github.com/herwinw
|
326
|
-
[@fsateler]: https://github.com/fsateler
|
327
|
-
[@andrykonchin]: https://github.com/andrykonchin
|
328
|
-
[@fatkodima]: https://github.com/fatkodima
|
329
|
-
[@tsmmark]: https://github.com/tsmmark
|
330
|
-
[@cstyles]: https://github.com/cstyles
|
331
|
-
[@ghiculescu]: https://github.com/ghiculescu
|
332
|
-
[@gi]: https://github.com/gi
|
333
|
-
[@ignacio-chiazzo]: https://github.com/ignacio-chiazzo
|
334
|
-
[@gjtorikian]: https://github.com/gjtorikian
|
335
|
-
[@ippachi]: https://github.com/ippachi
|
336
|
-
[@r7kamura]: https://github.com/r7kamura
|
data/CONTRIBUTING.md
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
# Contributing
|
2
|
-
|
3
|
-
If you discover issues, have ideas for improvements or new features,
|
4
|
-
please report them to the [issue tracker][1] of the repository or
|
5
|
-
submit a pull request. Please, try to follow these guidelines when you
|
6
|
-
do so.
|
7
|
-
|
8
|
-
## Issue reporting
|
9
|
-
|
10
|
-
* Check that the issue has not already been reported.
|
11
|
-
* Check that the issue has not already been fixed in the latest code
|
12
|
-
(a.k.a. `master`).
|
13
|
-
* Be clear, concise and precise in your description of the problem.
|
14
|
-
* Open an issue with a descriptive title and a summary in grammatically correct,
|
15
|
-
complete sentences.
|
16
|
-
* Include the output of `rubocop -V`:
|
17
|
-
|
18
|
-
```
|
19
|
-
$ rubocop -V
|
20
|
-
0.74.0 (using Parser 2.6.4.0, running on ruby 2.6.4 x86_64-darwin17)
|
21
|
-
```
|
22
|
-
|
23
|
-
* Include any relevant code to the issue summary.
|
24
|
-
|
25
|
-
## Pull requests
|
26
|
-
|
27
|
-
* Read [how to properly contribute to open source projects on GitHub][2].
|
28
|
-
* Fork the project.
|
29
|
-
* Use a topic/feature branch to easily amend a pull request later, if necessary.
|
30
|
-
* Write [good commit messages][3].
|
31
|
-
* Use the same coding conventions as the rest of the project.
|
32
|
-
* Commit and push until you are happy with your contribution.
|
33
|
-
* If your change has a corresponding open GitHub issue, prefix the commit message with `[Fix #github-issue-number]`.
|
34
|
-
* Make sure to add tests for it. This is important so I don't break it
|
35
|
-
in a future version unintentionally.
|
36
|
-
* Add an entry to the [Changelog](CHANGELOG.md) by creating a file `changelog/{type}_{some_description}.md`. See [changelog entry format](#changelog-entry-format) for details.
|
37
|
-
* Please try not to mess with the Rakefile, version, or history. If
|
38
|
-
you want to have your own version, or is otherwise necessary, that
|
39
|
-
is fine, but please isolate to its own commit so I can cherry-pick
|
40
|
-
around it.
|
41
|
-
* Make sure the test suite is passing and the code you wrote doesn't produce
|
42
|
-
RuboCop offenses (usually this is as simple as running `bundle exec rake`).
|
43
|
-
* [Squash related commits together][5].
|
44
|
-
* Open a [pull request][4] that relates to *only* one subject with a clear title
|
45
|
-
and description in grammatically correct, complete sentences.
|
46
|
-
|
47
|
-
### Changelog entry format
|
48
|
-
|
49
|
-
Here are a few examples:
|
50
|
-
|
51
|
-
```
|
52
|
-
* [#716](https://github.com/rubocop/rubocop-minitest/issues/716): Fixed a regression in the autocorrection logic of `MethodDefParentheses`. ([@bbatsov][])
|
53
|
-
* New cop `ElseLayout` checks for odd arrangement of code in the `else` branch of a conditional expression. ([@bbatsov][])
|
54
|
-
```
|
55
|
-
|
56
|
-
* Create one file `changelog/{type}_{some_description}.md`, where `type` is `new` (New feature), `fix` or `change`, and `some_description` is unique to avoid conflicts. Task `changelog:fix` (or `:new` or `:change`) can help you.
|
57
|
-
* Mark it up in [Markdown syntax][6].
|
58
|
-
* The entry line should start with `* ` (an asterisk and a space).
|
59
|
-
* If the change has a related GitHub issue (e.g. a bug fix for a reported issue), put a link to the issue as `[#123](https://github.com/rubocop/rubocop-minitest/issues/123): `.
|
60
|
-
* Describe the brief of the change. The sentence should end with a punctuation.
|
61
|
-
* At the end of the entry, add an implicit link to your GitHub user page as `([@username][])`.
|
62
|
-
* Alternatively, you may modify the CHANGELOG file directly, but this may result in conflicts later on. Also, if this is your first contribution to RuboCop Minitest project, add a link definition for the implicit link to the bottom of the changelog as `[@username]: https://github.com/username`.
|
63
|
-
|
64
|
-
[1]: https://github.com/rubocop/rubocop-minitest/issues
|
65
|
-
[2]: https://www.gun.io/blog/how-to-github-fork-branch-and-pull-request
|
66
|
-
[3]: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
67
|
-
[4]: https://help.github.com/articles/about-pull-requests
|
68
|
-
[5]: http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html
|
69
|
-
[6]: https://daringfireball.net/projects/markdown/syntax
|
data/Gemfile
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source 'https://rubygems.org'
|
4
|
-
|
5
|
-
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
6
|
-
|
7
|
-
gemspec
|
8
|
-
|
9
|
-
gem 'bump', require: false
|
10
|
-
gem 'rake'
|
11
|
-
gem 'rubocop', github: 'rubocop/rubocop'
|
12
|
-
gem 'rubocop-performance', '~> 1.13.0'
|
13
|
-
gem 'yard', '~> 0.9'
|
14
|
-
|
15
|
-
local_gemfile = File.expand_path('Gemfile.local', __dir__)
|
16
|
-
eval_gemfile local_gemfile if File.exist?(local_gemfile)
|
data/Rakefile
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
task release: 'changelog:check_clean' # Before task is required
|
4
|
-
|
5
|
-
require 'bundler'
|
6
|
-
require 'bundler/gem_tasks'
|
7
|
-
|
8
|
-
Dir['tasks/**/*.rake'].each { |t| load t }
|
9
|
-
|
10
|
-
begin
|
11
|
-
Bundler.setup(:default, :development)
|
12
|
-
rescue Bundler::BundlerError => e
|
13
|
-
warn e.message
|
14
|
-
warn 'Run `bundle install` to install missing gems'
|
15
|
-
exit e.status_code
|
16
|
-
end
|
17
|
-
|
18
|
-
require 'rubocop/rake_task'
|
19
|
-
require 'rake/testtask'
|
20
|
-
require_relative 'lib/rubocop/cop/generator'
|
21
|
-
|
22
|
-
Rake::TestTask.new do |t|
|
23
|
-
t.libs << 'test'
|
24
|
-
t.libs << 'lib'
|
25
|
-
t.test_files = FileList['test/**/*_test.rb']
|
26
|
-
end
|
27
|
-
|
28
|
-
desc 'Run RuboCop over itself'
|
29
|
-
RuboCop::RakeTask.new(:internal_investigation)
|
30
|
-
|
31
|
-
task default: %i[documentation_syntax_check test internal_investigation]
|
32
|
-
|
33
|
-
desc 'Generate a new cop template'
|
34
|
-
task :new_cop, [:cop] do |_task, args|
|
35
|
-
require 'rubocop'
|
36
|
-
|
37
|
-
cop_name = args.fetch(:cop) do
|
38
|
-
warn "usage: bundle exec rake 'new_cop[Department/Name]'"
|
39
|
-
exit!
|
40
|
-
end
|
41
|
-
|
42
|
-
generator = RuboCop::Cop::Generator.new(cop_name)
|
43
|
-
|
44
|
-
generator.write_source
|
45
|
-
generator.write_test
|
46
|
-
generator.inject_require(root_file_path: 'lib/rubocop/cop/minitest_cops.rb')
|
47
|
-
generator.inject_config(config_file_path: 'config/default.yml')
|
48
|
-
|
49
|
-
puts generator.todo
|
50
|
-
end
|
51
|
-
|
52
|
-
def bump_minor_version
|
53
|
-
major, minor, _patch = RuboCop::Minitest::Version::STRING.split('.')
|
54
|
-
|
55
|
-
"#{major}.#{minor.succ}"
|
56
|
-
end
|
data/bin/console
DELETED
data/bin/setup
DELETED
data/codespell.txt
DELETED
File without changes
|
data/docs/antora.yml
DELETED
data/docs/modules/ROOT/nav.adoc
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
= Cops
|
2
|
-
|
3
|
-
In RuboCop lingo the various checks performed on the code are called cops.
|
4
|
-
Each cop is responsible for detecting one particular offense.
|
5
|
-
RuboCop Minitest has only one Minitest department.
|
6
|
-
|
7
|
-
== Minitest
|
8
|
-
|
9
|
-
Minitest cops check for Minitest best practices and coding conventions. Many of the them are
|
10
|
-
based on the https://minitest.rubystyle.guide/[Minitest Style Guide].
|
11
|
-
|
12
|
-
// START_COP_LIST
|
13
|
-
|
14
|
-
=== Department xref:cops_minitest.adoc[Minitest]
|
15
|
-
|
16
|
-
* xref:cops_minitest.adoc#minitestassertempty[Minitest/AssertEmpty]
|
17
|
-
* xref:cops_minitest.adoc#minitestassertemptyliteral[Minitest/AssertEmptyLiteral]
|
18
|
-
* xref:cops_minitest.adoc#minitestassertequal[Minitest/AssertEqual]
|
19
|
-
* xref:cops_minitest.adoc#minitestassertindelta[Minitest/AssertInDelta]
|
20
|
-
* xref:cops_minitest.adoc#minitestassertincludes[Minitest/AssertIncludes]
|
21
|
-
* xref:cops_minitest.adoc#minitestassertinstanceof[Minitest/AssertInstanceOf]
|
22
|
-
* xref:cops_minitest.adoc#minitestassertkindof[Minitest/AssertKindOf]
|
23
|
-
* xref:cops_minitest.adoc#minitestassertmatch[Minitest/AssertMatch]
|
24
|
-
* xref:cops_minitest.adoc#minitestassertnil[Minitest/AssertNil]
|
25
|
-
* xref:cops_minitest.adoc#minitestassertoutput[Minitest/AssertOutput]
|
26
|
-
* xref:cops_minitest.adoc#minitestassertpathexists[Minitest/AssertPathExists]
|
27
|
-
* xref:cops_minitest.adoc#minitestassertpredicate[Minitest/AssertPredicate]
|
28
|
-
* xref:cops_minitest.adoc#minitestassertraisescompoundbody[Minitest/AssertRaisesCompoundBody]
|
29
|
-
* xref:cops_minitest.adoc#minitestassertrespondto[Minitest/AssertRespondTo]
|
30
|
-
* xref:cops_minitest.adoc#minitestassertsilent[Minitest/AssertSilent]
|
31
|
-
* xref:cops_minitest.adoc#minitestasserttruthy[Minitest/AssertTruthy]
|
32
|
-
* xref:cops_minitest.adoc#minitestassertwithexpectedargument[Minitest/AssertWithExpectedArgument]
|
33
|
-
* xref:cops_minitest.adoc#minitestassertioninlifecyclehook[Minitest/AssertionInLifecycleHook]
|
34
|
-
* xref:cops_minitest.adoc#minitestduplicatetestrun[Minitest/DuplicateTestRun]
|
35
|
-
* xref:cops_minitest.adoc#minitestglobalexpectations[Minitest/GlobalExpectations]
|
36
|
-
* xref:cops_minitest.adoc#minitestliteralasactualargument[Minitest/LiteralAsActualArgument]
|
37
|
-
* xref:cops_minitest.adoc#minitestmultipleassertions[Minitest/MultipleAssertions]
|
38
|
-
* xref:cops_minitest.adoc#minitestnoassertions[Minitest/NoAssertions]
|
39
|
-
* xref:cops_minitest.adoc#minitestrefuteempty[Minitest/RefuteEmpty]
|
40
|
-
* xref:cops_minitest.adoc#minitestrefuteequal[Minitest/RefuteEqual]
|
41
|
-
* xref:cops_minitest.adoc#minitestrefutefalse[Minitest/RefuteFalse]
|
42
|
-
* xref:cops_minitest.adoc#minitestrefuteindelta[Minitest/RefuteInDelta]
|
43
|
-
* xref:cops_minitest.adoc#minitestrefuteincludes[Minitest/RefuteIncludes]
|
44
|
-
* xref:cops_minitest.adoc#minitestrefuteinstanceof[Minitest/RefuteInstanceOf]
|
45
|
-
* xref:cops_minitest.adoc#minitestrefutekindof[Minitest/RefuteKindOf]
|
46
|
-
* xref:cops_minitest.adoc#minitestrefutematch[Minitest/RefuteMatch]
|
47
|
-
* xref:cops_minitest.adoc#minitestrefutenil[Minitest/RefuteNil]
|
48
|
-
* xref:cops_minitest.adoc#minitestrefutepathexists[Minitest/RefutePathExists]
|
49
|
-
* xref:cops_minitest.adoc#minitestrefutepredicate[Minitest/RefutePredicate]
|
50
|
-
* xref:cops_minitest.adoc#minitestrefuterespondto[Minitest/RefuteRespondTo]
|
51
|
-
* xref:cops_minitest.adoc#minitestskipensure[Minitest/SkipEnsure]
|
52
|
-
* xref:cops_minitest.adoc#minitesttestmethodname[Minitest/TestMethodName]
|
53
|
-
* xref:cops_minitest.adoc#minitestunreachableassertion[Minitest/UnreachableAssertion]
|
54
|
-
* xref:cops_minitest.adoc#minitestunspecifiedexception[Minitest/UnspecifiedException]
|
55
|
-
|
56
|
-
// END_COP_LIST
|