rubocop-minitest 0.10.3 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +0 -3
- data/.github/ISSUE_TEMPLATE/bug_report.md +5 -1
- data/.rubocop.yml +4 -1
- data/CHANGELOG.md +97 -52
- data/CONTRIBUTING.md +3 -3
- data/Gemfile +2 -2
- data/README.md +4 -4
- data/Rakefile +1 -1
- data/bin/console +2 -0
- data/config/default.yml +15 -4
- data/docs/antora.yml +1 -1
- data/docs/modules/ROOT/pages/cops.adoc +2 -0
- data/docs/modules/ROOT/pages/cops_minitest.adoc +71 -7
- data/docs/modules/ROOT/pages/index.adoc +1 -1
- data/legacy-docs/cops_minitest.md +16 -16
- data/legacy-docs/index.md +1 -1
- data/lib/rubocop/cop/minitest/assert_empty.rb +1 -1
- data/lib/rubocop/cop/minitest/assert_empty_literal.rb +12 -16
- data/lib/rubocop/cop/minitest/assert_equal.rb +1 -1
- data/lib/rubocop/cop/minitest/assert_in_delta.rb +4 -1
- data/lib/rubocop/cop/minitest/assert_includes.rb +1 -1
- data/lib/rubocop/cop/minitest/assert_instance_of.rb +1 -1
- data/lib/rubocop/cop/minitest/assert_kind_of.rb +1 -1
- data/lib/rubocop/cop/minitest/assert_match.rb +1 -1
- data/lib/rubocop/cop/minitest/assert_nil.rb +5 -11
- data/lib/rubocop/cop/minitest/assert_output.rb +1 -1
- data/lib/rubocop/cop/minitest/assert_path_exists.rb +6 -12
- data/lib/rubocop/cop/minitest/assert_respond_to.rb +1 -1
- data/lib/rubocop/cop/minitest/assert_silent.rb +8 -6
- data/lib/rubocop/cop/minitest/assert_truthy.rb +5 -11
- data/lib/rubocop/cop/minitest/assert_with_expected_argument.rb +41 -0
- data/lib/rubocop/cop/minitest/assertion_in_lifecycle_hook.rb +1 -1
- data/lib/rubocop/cop/minitest/global_expectations.rb +6 -7
- data/lib/rubocop/cop/minitest/literal_as_actual_argument.rb +15 -14
- data/lib/rubocop/cop/minitest/multiple_assertions.rb +2 -2
- data/lib/rubocop/cop/minitest/no_assertions.rb +48 -0
- data/lib/rubocop/cop/minitest/refute_empty.rb +1 -1
- data/lib/rubocop/cop/minitest/refute_equal.rb +6 -7
- data/lib/rubocop/cop/minitest/refute_false.rb +15 -22
- data/lib/rubocop/cop/minitest/refute_in_delta.rb +4 -1
- data/lib/rubocop/cop/minitest/refute_includes.rb +1 -1
- data/lib/rubocop/cop/minitest/refute_instance_of.rb +1 -1
- data/lib/rubocop/cop/minitest/refute_kind_of.rb +1 -1
- data/lib/rubocop/cop/minitest/refute_match.rb +1 -1
- data/lib/rubocop/cop/minitest/refute_nil.rb +4 -8
- data/lib/rubocop/cop/minitest/refute_path_exists.rb +6 -12
- data/lib/rubocop/cop/minitest/refute_respond_to.rb +1 -1
- data/lib/rubocop/cop/minitest/test_method_name.rb +9 -8
- data/lib/rubocop/cop/minitest/unspecified_exception.rb +1 -1
- data/lib/rubocop/cop/minitest_cops.rb +2 -0
- data/lib/rubocop/cop/mixin/in_delta_mixin.rb +5 -15
- data/lib/rubocop/cop/mixin/minitest_cop_rule.rb +12 -12
- data/lib/rubocop/cop/mixin/minitest_exploration_helpers.rb +14 -4
- data/lib/rubocop/minitest/version.rb +1 -1
- data/mkdocs.yml +1 -1
- data/relnotes/v0.1.0.md +1 -1
- data/relnotes/v0.10.0.md +12 -12
- data/relnotes/v0.10.1.md +1 -1
- data/relnotes/v0.10.2.md +1 -1
- data/relnotes/v0.10.3.md +1 -1
- data/relnotes/v0.11.0.md +16 -0
- data/relnotes/v0.11.1.md +5 -0
- data/relnotes/v0.12.0.md +10 -0
- data/relnotes/v0.12.1.md +5 -0
- data/relnotes/v0.13.0.md +5 -0
- data/relnotes/v0.2.0.md +4 -4
- data/relnotes/v0.2.1.md +1 -1
- data/relnotes/v0.3.0.md +6 -6
- data/relnotes/v0.4.0.md +5 -5
- data/relnotes/v0.4.1.md +1 -1
- data/relnotes/v0.5.0.md +1 -1
- data/relnotes/v0.5.1.md +1 -1
- data/relnotes/v0.6.0.md +1 -1
- data/relnotes/v0.6.1.md +2 -2
- data/relnotes/v0.6.2.md +1 -1
- data/relnotes/v0.7.0.md +5 -5
- data/relnotes/v0.8.0.md +4 -4
- data/relnotes/v0.8.1.md +1 -1
- data/relnotes/v0.9.0.md +3 -3
- data/rubocop-minitest.gemspec +5 -5
- data/tasks/cops_documentation.rake +10 -12
- metadata +17 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb85f2ad7f928abf4e8f8e2c22c8508700960b11bdb8215b4ca8ea792a96dd73
|
4
|
+
data.tar.gz: 404314baeb561c4be2bd64eb1ec154d014942975ce4c0780b43df4c1a35e9286
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b20af6e92af74832f025aad226808d3343da4dd427149137b331a0ad177ab6aabcf5f326dfc83022aa50b73dc21fc48e4bb5149f2aa2506c7cf4ba7a0b7a97ac
|
7
|
+
data.tar.gz: a535fb3d220ec32ceb6c1fb2cd75f7cdd7061709334609e566900e65c47506ea15751827f8b49d3f73af8cc8b39705534c817b55aead18c3f3206e877f0996b8
|
data/.circleci/config.yml
CHANGED
@@ -32,8 +32,12 @@ a problem will expedite its solution.
|
|
32
32
|
## RuboCop version
|
33
33
|
|
34
34
|
Include the output of `rubocop -V` or `bundle exec rubocop -V` if using Bundler. Here's an example:
|
35
|
+
You see extension cop versions (e.g. rubocop-minitest, rubocop-performance, and others) output by rubocop -V,
|
36
|
+
include them as well. Here's an example:
|
35
37
|
|
36
38
|
```
|
37
39
|
$ [bundle exec] rubocop -V
|
38
|
-
|
40
|
+
1.10.0 (using Parser 3.0.0.0, rubocop-ast 1.4.1, running on ruby 3.0.0 x86_64-darwin19)
|
41
|
+
- rubocop-minitest 0.10.3
|
42
|
+
- rubocop-performance 1.9.2
|
39
43
|
```
|
data/.rubocop.yml
CHANGED
@@ -9,9 +9,12 @@ require:
|
|
9
9
|
|
10
10
|
AllCops:
|
11
11
|
NewCops: enable
|
12
|
-
TargetRubyVersion: 2.
|
12
|
+
TargetRubyVersion: 2.5
|
13
13
|
SuggestExtensions: false
|
14
14
|
|
15
|
+
InternalAffairs/NodeMatcherDirective:
|
16
|
+
Enabled: false
|
17
|
+
|
15
18
|
Naming/PredicateName:
|
16
19
|
# Method define macros for dynamically generated method.
|
17
20
|
MethodDefinitionMacros:
|
data/CHANGELOG.md
CHANGED
@@ -2,171 +2,214 @@
|
|
2
2
|
|
3
3
|
## master (unreleased)
|
4
4
|
|
5
|
+
## 0.13.0 (2021-06-20)
|
6
|
+
|
7
|
+
### New features
|
8
|
+
|
9
|
+
* [#136](https://github.com/rubocop/rubocop-minitest/pull/136): Support Active Support's `test` method for `Minitest/MultipleAssertions` and `Minitest/NoAssertions` cops. ([@koic][])
|
10
|
+
|
11
|
+
## 0.12.1 (2021-04-25)
|
12
|
+
|
13
|
+
### Bug fixes
|
14
|
+
|
15
|
+
* [#131](https://github.com/rubocop/rubocop-minitest/issues/131): Fix an error for `Minitest/MultipleAssertions` and fixes a false positive for `test` block. ([@koic][])
|
16
|
+
|
17
|
+
## 0.12.0 (2021-04-23)
|
18
|
+
|
19
|
+
### New features
|
20
|
+
|
21
|
+
* [#124](https://github.com/rubocop/rubocop-minitest/pull/124): Add new `Minitest/NoAssertions` cop. ([@ghiculescu][])
|
22
|
+
|
23
|
+
### Changes
|
24
|
+
|
25
|
+
* [#129](https://github.com/rubocop/rubocop-minitest/pull/129): Drop Ruby 2.4 support. ([@koic][])
|
26
|
+
|
27
|
+
## 0.11.1 (2021-03-31)
|
28
|
+
|
29
|
+
### Changes
|
30
|
+
|
31
|
+
* [#126](https://github.com/rubocop/rubocop-minitest/issues/126): Mark `Minitest/AssertWithExpectedArgument` as unsafe. ([@koic][])
|
32
|
+
|
33
|
+
## 0.11.0 (2021-03-22)
|
34
|
+
|
35
|
+
### New features
|
36
|
+
|
37
|
+
* [#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][])
|
38
|
+
|
39
|
+
### Bug fixes
|
40
|
+
|
41
|
+
* [#122](https://github.com/rubocop/rubocop-minitest/pull/122): Fix `Minitest/TestMethodName` for tests with multiple assertions. ([@ghiculescu][])
|
42
|
+
|
43
|
+
### Changes
|
44
|
+
|
45
|
+
* [#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][])
|
46
|
+
* [#125](https://github.com/rubocop/rubocop-minitest/pull/125): Require RuboCop 0.90 or higher. ([@koic][])
|
47
|
+
|
5
48
|
## 0.10.3 (2021-01-12)
|
6
49
|
|
7
50
|
### Bug fixes
|
8
51
|
|
9
|
-
* [#115](https://github.com/rubocop
|
52
|
+
* [#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][])
|
10
53
|
|
11
54
|
## 0.10.2 (2020-12-27)
|
12
55
|
|
13
56
|
### Bug fixes
|
14
57
|
|
15
|
-
* [#113](https://github.com/rubocop
|
58
|
+
* [#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][])
|
16
59
|
|
17
60
|
## 0.10.1 (2020-07-25)
|
18
61
|
|
19
62
|
### Bug fixes
|
20
63
|
|
21
|
-
* [#106](https://github.com/rubocop
|
64
|
+
* [#106](https://github.com/rubocop/rubocop-minitest/issues/106): Fix an error for `Minitest/AssertOutput` when using gvar at top level. ([@koic][])
|
22
65
|
|
23
66
|
## 0.10.0 (2020-07-12)
|
24
67
|
|
25
68
|
### New features
|
26
69
|
|
27
|
-
* [#92](https://github.com/rubocop
|
28
|
-
* [#95](https://github.com/rubocop
|
29
|
-
* [#91](https://github.com/rubocop
|
30
|
-
* [#89](https://github.com/rubocop
|
31
|
-
* [#83](https://github.com/rubocop
|
32
|
-
* [#88](https://github.com/rubocop
|
33
|
-
* [#87](https://github.com/rubocop
|
34
|
-
* [#96](https://github.com/rubocop
|
35
|
-
* [#98](https://github.com/rubocop
|
36
|
-
* [#84](https://github.com/rubocop
|
37
|
-
* [#85](https://github.com/rubocop
|
70
|
+
* [#92](https://github.com/rubocop/rubocop-minitest/pull/92): Add new `Minitest/LiteralAsActualArgument` cop. ([@fatkodima][], [@tsmmark][])
|
71
|
+
* [#95](https://github.com/rubocop/rubocop-minitest/pull/95): Add new `Minitest/AssertionInLifecycleHook` cop. ([@fatkodima][])
|
72
|
+
* [#91](https://github.com/rubocop/rubocop-minitest/pull/91): Add new `Minitest/AssertInDelta` and `Minitest/RefuteInDelta` cops. ([@fatkodima][])
|
73
|
+
* [#89](https://github.com/rubocop/rubocop-minitest/pull/89): Add new `Minitest/TestMethodName` cop. ([@fatkodima][])
|
74
|
+
* [#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][])
|
75
|
+
* [#88](https://github.com/rubocop/rubocop-minitest/pull/88): Add new `Minitest/MultipleAssertions` cop. ([@fatkodima][])
|
76
|
+
* [#87](https://github.com/rubocop/rubocop-minitest/pull/87): Add new `Minitest/AssertSilent` cop. ([@fatkodima][])
|
77
|
+
* [#96](https://github.com/rubocop/rubocop-minitest/pull/96): Add new `Minitest/UnspecifiedException` cop. ([@fatkodima][])
|
78
|
+
* [#98](https://github.com/rubocop/rubocop-minitest/pull/98): Add new `Minitest/AssertOutput` cop. ([@fatkodima][])
|
79
|
+
* [#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][])
|
80
|
+
* [#85](https://github.com/rubocop/rubocop-minitest/pull/85): Add autocorrect to `Rails/AssertEmptyLiteral` cop. ([@fatkodima][])
|
38
81
|
|
39
82
|
### Changes
|
40
83
|
|
41
|
-
* [#104](https://github.com/rubocop
|
84
|
+
* [#104](https://github.com/rubocop/rubocop-minitest/pull/104): Require RuboCop 0.87 or higher. ([@koic][])
|
42
85
|
|
43
86
|
## 0.9.0 (2020-04-13)
|
44
87
|
|
45
88
|
### Bug fixes
|
46
89
|
|
47
|
-
* [#75](https://github.com/rubocop
|
90
|
+
* [#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][])
|
48
91
|
|
49
92
|
### Changes
|
50
93
|
|
51
|
-
* [#73](https://github.com/rubocop
|
52
|
-
* [#77](https://github.com/rubocop
|
94
|
+
* [#73](https://github.com/rubocop/rubocop-minitest/issues/73): The Minitest department works on file names end with `_test.rb` by default. ([@koic][])
|
95
|
+
* [#77](https://github.com/rubocop/rubocop-minitest/pull/77): **(BREAKING)** Drop support for Ruby 2.3. ([@koic][])
|
53
96
|
|
54
97
|
## 0.8.1 (2020-04-06)
|
55
98
|
|
56
99
|
### Bug fixes
|
57
100
|
|
58
|
-
* [#72](https://github.com/rubocop
|
101
|
+
* [#72](https://github.com/rubocop/rubocop-minitest/pull/72): Fix some false negatives for `Minitest/GlobalExpectations`. ([@andrykonchin][])
|
59
102
|
|
60
103
|
## 0.8.0 (2020-03-24)
|
61
104
|
|
62
105
|
### New features
|
63
106
|
|
64
|
-
* [#66](https://github.com/rubocop
|
107
|
+
* [#66](https://github.com/rubocop/rubocop-minitest/issues/66): Support all expectations of `Minitest::Expectations` for `Minitest/GlobalExpectations` cop. ([@koic][])
|
65
108
|
|
66
109
|
### Bug fixes
|
67
110
|
|
68
|
-
* [#60](https://github.com/rubocop
|
69
|
-
* [#69](https://github.com/rubocop
|
70
|
-
* [#71](https://github.com/rubocop
|
111
|
+
* [#60](https://github.com/rubocop/rubocop-minitest/issues/60): Fix `Minitest/GlobalExpectations` autocorrection for chained methods. ([@tejasbubane][])
|
112
|
+
* [#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][])
|
113
|
+
* [#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][])
|
71
114
|
|
72
115
|
## 0.7.0 (2020-03-09)
|
73
116
|
|
74
117
|
### New features
|
75
118
|
|
76
|
-
* [#60](https://github.com/rubocop
|
119
|
+
* [#60](https://github.com/rubocop/rubocop-minitest/issues/60): Add new cop `Minitest/GlobalExpectations` to check for deprecated global expectations. ([@tejasbubane][])
|
77
120
|
|
78
121
|
### Bug fixes
|
79
122
|
|
80
|
-
* [#58](https://github.com/rubocop
|
81
|
-
* [#59](https://github.com/rubocop
|
82
|
-
* [#61](https://github.com/rubocop
|
83
|
-
* [#62](https://github.com/rubocop
|
123
|
+
* [#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][])
|
124
|
+
* [#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][])
|
125
|
+
* [#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][])
|
126
|
+
* [#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][])
|
84
127
|
|
85
128
|
## 0.6.2 (2020-02-19)
|
86
129
|
|
87
130
|
### Bug fixes
|
88
131
|
|
89
|
-
* [#55](https://github.com/rubocop
|
132
|
+
* [#55](https://github.com/rubocop/rubocop-minitest/issues/55): Fix an error for `Minitest/AssertIncludes` when using local variable argument. ([@koic][])
|
90
133
|
|
91
134
|
## 0.6.1 (2020-02-18)
|
92
135
|
|
93
136
|
### Bug fixes
|
94
137
|
|
95
|
-
* [#52](https://github.com/rubocop
|
96
|
-
* [#52](https://github.com/rubocop
|
138
|
+
* [#52](https://github.com/rubocop/rubocop-minitest/issues/52): Make `Minitest/RefuteFalse` cop aware of `assert(!test)`. ([@koic][])
|
139
|
+
* [#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][])
|
97
140
|
|
98
141
|
## 0.6.0 (2020-02-07)
|
99
142
|
|
100
143
|
### New features
|
101
144
|
|
102
|
-
* [#49](https://github.com/rubocop
|
145
|
+
* [#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][])
|
103
146
|
|
104
147
|
## 0.5.1 (2019-12-25)
|
105
148
|
|
106
149
|
### Bug fixes
|
107
150
|
|
108
|
-
* [#42](https://github.com/rubocop
|
151
|
+
* [#42](https://github.com/rubocop/rubocop-minitest/issues/42): Fix an incorrect autocorrect for some cops of `Minitest` department when using heredoc message. ([@koic][])
|
109
152
|
|
110
153
|
## 0.5.0 (2019-11-24)
|
111
154
|
|
112
155
|
### New features
|
113
156
|
|
114
|
-
* [#32](https://github.com/rubocop
|
157
|
+
* [#32](https://github.com/rubocop/rubocop-minitest/issues/32): Add new `Minitest/AssertEmptyLiteral` cop. ([@tejasbubane][])
|
115
158
|
|
116
159
|
## 0.4.1 (2019-11-10)
|
117
160
|
|
118
161
|
### Bug fixes
|
119
162
|
|
120
|
-
* [#39](https://github.com/rubocop
|
163
|
+
* [#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][])
|
121
164
|
|
122
165
|
## 0.4.0 (2019-11-07)
|
123
166
|
|
124
167
|
### New features
|
125
168
|
|
126
|
-
* [#29](https://github.com/rubocop
|
127
|
-
* [#31](https://github.com/rubocop
|
128
|
-
* [#34](https://github.com/rubocop
|
129
|
-
* [#35](https://github.com/rubocop
|
169
|
+
* [#29](https://github.com/rubocop/rubocop-minitest/pull/29): Add new `Minitest/RefuteRespondTo` cop. ([@herwinw][])
|
170
|
+
* [#31](https://github.com/rubocop/rubocop-minitest/pull/31): Add new `Minitest/AssertEqual` cop. ([@herwinw][])
|
171
|
+
* [#34](https://github.com/rubocop/rubocop-minitest/pull/34): Add new `Minitest/AssertInstanceOf` cop. ([@abhaynikam][])
|
172
|
+
* [#35](https://github.com/rubocop/rubocop-minitest/pull/35): Add new `Minitest/RefuteInstanceOf` cop. ([@abhaynikam][])
|
130
173
|
|
131
174
|
### Bug fixes
|
132
175
|
|
133
|
-
* [#25](https://github.com/rubocop
|
176
|
+
* [#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][])
|
134
177
|
|
135
178
|
## 0.3.0 (2019-10-13)
|
136
179
|
|
137
180
|
### New features
|
138
181
|
|
139
|
-
* [#15](https://github.com/rubocop
|
140
|
-
* [#18](https://github.com/rubocop
|
141
|
-
* [#20](https://github.com/rubocop
|
142
|
-
* [#21](https://github.com/rubocop
|
143
|
-
* [#27](https://github.com/rubocop
|
182
|
+
* [#15](https://github.com/rubocop/rubocop-minitest/pull/15): Add new `Minitest/RefuteIncludes` cop. ([@abhaynikam][])
|
183
|
+
* [#18](https://github.com/rubocop/rubocop-minitest/pull/18): Add new `Minitest/RefuteFalse` cop. ([@duduribeiro][])
|
184
|
+
* [#20](https://github.com/rubocop/rubocop-minitest/pull/20): Add new `Minitest/RefuteEmpty` cop. ([@abhaynikam][])
|
185
|
+
* [#21](https://github.com/rubocop/rubocop-minitest/pull/21): Add new `Minitest/RefuteEqual` cop. ([@duduribeiro][])
|
186
|
+
* [#27](https://github.com/rubocop/rubocop-minitest/pull/27): Add new `Minitest/AssertRespondTo` cop. ([@duduribeiro][])
|
144
187
|
|
145
188
|
### Bug fixes
|
146
189
|
|
147
|
-
* [#19](https://github.com/rubocop
|
190
|
+
* [#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][])
|
148
191
|
|
149
192
|
## 0.2.1 (2019-09-24)
|
150
193
|
|
151
194
|
### Bug fixes
|
152
195
|
|
153
|
-
* [#13](https://github.com/rubocop
|
196
|
+
* [#13](https://github.com/rubocop/rubocop-minitest/issues/13): Fix the execution target specified in `Include` parameter. ([@koic][])
|
154
197
|
|
155
198
|
## 0.2.0 (2019-09-21)
|
156
199
|
|
157
200
|
### New features
|
158
201
|
|
159
|
-
* [#11](https://github.com/rubocop
|
160
|
-
* [#8](https://github.com/rubocop
|
161
|
-
* [#9](https://github.com/rubocop
|
162
|
-
* [#10](https://github.com/rubocop
|
202
|
+
* [#11](https://github.com/rubocop/rubocop-minitest/pull/11): Add new `Minitest/RefuteNil` cop. ([@tejasbubane][])
|
203
|
+
* [#8](https://github.com/rubocop/rubocop-minitest/pull/8): Add new `Minitest/AssertTruthy` cop. ([@abhaynikam][])
|
204
|
+
* [#9](https://github.com/rubocop/rubocop-minitest/pull/9): Add new `Minitest/AssertIncludes` cop. ([@abhaynikam][])
|
205
|
+
* [#10](https://github.com/rubocop/rubocop-minitest/pull/10): Add new `Minitest/AssertEmpty` cop. ([@abhaynikam][])
|
163
206
|
|
164
207
|
## 0.1.0 (2019-09-01)
|
165
208
|
|
166
209
|
### New features
|
167
210
|
|
168
211
|
* Create RuboCop Minitest gem. ([@koic][])
|
169
|
-
* [#6](https://github.com/rubocop
|
212
|
+
* [#6](https://github.com/rubocop/rubocop-minitest/pull/6): Add new `Minitest/AssertNil` cop. ([@duduribeiro][])
|
170
213
|
|
171
214
|
[@koic]: https://github.com/koic
|
172
215
|
[@duduribeiro]: https://github.com/duduribeiro
|
@@ -177,3 +220,5 @@
|
|
177
220
|
[@andrykonchin]: https://github.com/andrykonchin
|
178
221
|
[@fatkodima]: https://github.com/fatkodima
|
179
222
|
[@tsmmark]: https://github.com/tsmmark
|
223
|
+
[@cstyles]: https://github.com/cstyles
|
224
|
+
[@ghiculescu]: https://github.com/ghiculescu
|
data/CONTRIBUTING.md
CHANGED
@@ -49,18 +49,18 @@ $ rubocop -V
|
|
49
49
|
Here are a few examples:
|
50
50
|
|
51
51
|
```
|
52
|
-
* [#716](https://github.com/rubocop
|
52
|
+
* [#716](https://github.com/rubocop/rubocop-minitest/issues/716): Fixed a regression in the auto-correction logic of `MethodDefParentheses`. ([@bbatsov][])
|
53
53
|
* New cop `ElseLayout` checks for odd arrangement of code in the `else` branch of a conditional expression. ([@bbatsov][])
|
54
54
|
```
|
55
55
|
|
56
56
|
* Mark it up in [Markdown syntax][6].
|
57
57
|
* The entry line should start with `* ` (an asterisk and a space).
|
58
|
-
* 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
|
58
|
+
* 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): `.
|
59
59
|
* Describe the brief of the change. The sentence should end with a punctuation.
|
60
60
|
* At the end of the entry, add an implicit link to your GitHub user page as `([@username][])`.
|
61
61
|
* If this is your first contribution to RuboCop project, add a link definition for the implicit link to the bottom of the changelog as `[@username]: https://github.com/username`.
|
62
62
|
|
63
|
-
[1]: https://github.com/rubocop
|
63
|
+
[1]: https://github.com/rubocop/rubocop-minitest/issues
|
64
64
|
[2]: https://www.gun.io/blog/how-to-github-fork-branch-and-pull-request
|
65
65
|
[3]: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
66
66
|
[4]: https://help.github.com/articles/about-pull-requests
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# RuboCop Minitest
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/rubocop-minitest.svg)](https://badge.fury.io/rb/rubocop-minitest)
|
4
|
-
[![CircleCI](https://circleci.com/gh/rubocop
|
4
|
+
[![CircleCI](https://circleci.com/gh/rubocop/rubocop-minitest.svg?style=svg)](https://circleci.com/gh/rubocop/rubocop-minitest)
|
5
5
|
|
6
|
-
A [RuboCop](https://github.com/rubocop
|
6
|
+
A [RuboCop](https://github.com/rubocop/rubocop) extension focused on enforcing Minitest best practices and coding conventions.
|
7
7
|
The library is based on the guidelines outlined in the community [Minitest Style Guide](https://minitest.rubystyle.guide).
|
8
8
|
|
9
9
|
## Installation
|
@@ -81,14 +81,14 @@ You can read a lot more about RuboCop Minitest in its [official docs](https://do
|
|
81
81
|
|
82
82
|
If you use RuboCop Minitest in your project, you can include one of these badges in your readme to let people know that your code is written following the community Minitest Style Guide.
|
83
83
|
|
84
|
-
[![Minitest Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop
|
84
|
+
[![Minitest Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop-minitest)
|
85
85
|
|
86
86
|
[![Minitest Style Guide](https://img.shields.io/badge/code_style-community-brightgreen.svg)](https://minitest.rubystyle.guide)
|
87
87
|
|
88
88
|
Here are the Markdown snippets for the two badges:
|
89
89
|
|
90
90
|
``` markdown
|
91
|
-
[![Minitest Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop
|
91
|
+
[![Minitest Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop-minitest)
|
92
92
|
|
93
93
|
[![Minitest Style Guide](https://img.shields.io/badge/code_style-community-brightgreen.svg)](https://minitest.rubystyle.guide)
|
94
94
|
```
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/config/default.yml
CHANGED
@@ -15,7 +15,7 @@ Minitest/AssertEmptyLiteral:
|
|
15
15
|
Enabled: true
|
16
16
|
SafeAutoCorrect: false
|
17
17
|
VersionAdded: '0.5'
|
18
|
-
VersionChanged: '0.
|
18
|
+
VersionChanged: '0.11'
|
19
19
|
|
20
20
|
Minitest/AssertEqual:
|
21
21
|
Description: 'This cop enforces the test to use `assert_equal` instead of using `assert(expected == actual)`.'
|
@@ -54,7 +54,7 @@ Minitest/AssertInstanceOf:
|
|
54
54
|
|
55
55
|
Minitest/AssertKindOf:
|
56
56
|
Description: 'This cop enforces the test to use `assert_kind_of(Class, object)` over `assert(object.kind_of?(Class))`'
|
57
|
-
StyleGuide: 'https://github.com/rubocop
|
57
|
+
StyleGuide: 'https://github.com/rubocop/minitest-style-guide#assert-kind-of'
|
58
58
|
Enabled: 'pending'
|
59
59
|
VersionAdded: '0.10'
|
60
60
|
|
@@ -84,7 +84,7 @@ Minitest/AssertRespondTo:
|
|
84
84
|
|
85
85
|
Minitest/AssertSilent:
|
86
86
|
Description: "This cop enforces the test to use `assert_silent { ... }` instead of using `assert_output('', '') { ... }`."
|
87
|
-
StyleGuide: 'https://github.com/rubocop
|
87
|
+
StyleGuide: 'https://github.com/rubocop/minitest-style-guide#assert-silent'
|
88
88
|
Enabled: 'pending'
|
89
89
|
VersionAdded: '0.10'
|
90
90
|
|
@@ -94,6 +94,12 @@ Minitest/AssertTruthy:
|
|
94
94
|
Enabled: true
|
95
95
|
VersionAdded: '0.2'
|
96
96
|
|
97
|
+
Minitest/AssertWithExpectedArgument:
|
98
|
+
Description: 'This cop tries to detect when a user accidentally used `assert` when they meant to use `assert_equal`.'
|
99
|
+
Enabled: pending
|
100
|
+
Safe: false
|
101
|
+
VersionAdded: '0.11'
|
102
|
+
|
97
103
|
Minitest/GlobalExpectations:
|
98
104
|
Description: 'This cop checks for deprecated global expectations.'
|
99
105
|
StyleGuide: 'https://minitest.rubystyle.guide#global-expectations'
|
@@ -112,6 +118,11 @@ Minitest/MultipleAssertions:
|
|
112
118
|
VersionAdded: '0.10'
|
113
119
|
Max: 3
|
114
120
|
|
121
|
+
Minitest/NoAssertions:
|
122
|
+
Description: 'This cop checks for at least one assertion (or flunk) in tests.'
|
123
|
+
Enabled: false
|
124
|
+
VersionAdded: '0.12'
|
125
|
+
|
115
126
|
Minitest/RefuteEmpty:
|
116
127
|
Description: 'This cop enforces to use `refute_empty` instead of using `refute(object.empty?)`.'
|
117
128
|
StyleGuide: 'https://minitest.rubystyle.guide#refute-empty'
|
@@ -156,7 +167,7 @@ Minitest/RefuteInstanceOf:
|
|
156
167
|
|
157
168
|
Minitest/RefuteKindOf:
|
158
169
|
Description: 'This cop enforces the test to use `refute_kind_of(Class, object)` over `refute(object.kind_of?(Class))`.'
|
159
|
-
StyleGuide: 'https://github.com/rubocop
|
170
|
+
StyleGuide: 'https://github.com/rubocop/minitest-style-guide#refute-kind-of'
|
160
171
|
Enabled: 'pending'
|
161
172
|
VersionAdded: '0.10'
|
162
173
|
|