rubocop-minitest 0.10.3 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +5 -1
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +69 -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 +9 -4
- data/docs/antora.yml +1 -1
- data/docs/modules/ROOT/pages/cops.adoc +1 -0
- data/docs/modules/ROOT/pages/cops_minitest.adoc +36 -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_literal.rb +9 -8
- data/lib/rubocop/cop/minitest/assert_in_delta.rb +2 -0
- data/lib/rubocop/cop/minitest/assert_nil.rb +1 -0
- data/lib/rubocop/cop/minitest/assert_path_exists.rb +1 -0
- data/lib/rubocop/cop/minitest/assert_truthy.rb +1 -0
- data/lib/rubocop/cop/minitest/assert_with_expected_argument.rb +38 -0
- data/lib/rubocop/cop/minitest/global_expectations.rb +2 -0
- data/lib/rubocop/cop/minitest/literal_as_actual_argument.rb +1 -0
- data/lib/rubocop/cop/minitest/refute_equal.rb +1 -0
- data/lib/rubocop/cop/minitest/refute_false.rb +1 -0
- data/lib/rubocop/cop/minitest/refute_in_delta.rb +2 -0
- data/lib/rubocop/cop/minitest/refute_nil.rb +1 -0
- data/lib/rubocop/cop/minitest/refute_path_exists.rb +1 -0
- data/lib/rubocop/cop/minitest/test_method_name.rb +1 -1
- data/lib/rubocop/cop/minitest_cops.rb +1 -0
- data/lib/rubocop/cop/mixin/minitest_cop_rule.rb +1 -0
- 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.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 +4 -4
- metadata +11 -9
data/relnotes/v0.11.0.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
### New features
|
2
|
+
|
3
|
+
* [#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][])
|
4
|
+
|
5
|
+
### Bug fixes
|
6
|
+
|
7
|
+
* [#122](https://github.com/rubocop/rubocop-minitest/pull/122): Fix `Minitest/TestMethodName` for tests with multiple assertions. ([@ghiculescu][])
|
8
|
+
|
9
|
+
### Changes
|
10
|
+
|
11
|
+
* [#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][])
|
12
|
+
* [#125](https://github.com/rubocop/rubocop-minitest/pull/125): Require RuboCop 0.90 or higher. ([@koic][])
|
13
|
+
|
14
|
+
[@cstyles]: https://github.com/cstyles
|
15
|
+
[@ghiculescu]: https://github.com/ghiculescu
|
16
|
+
[@koic]: https://github.com/koic
|
data/relnotes/v0.2.0.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
### New features
|
2
2
|
|
3
|
-
* [#11](https://github.com/rubocop
|
4
|
-
* [#8](https://github.com/rubocop
|
5
|
-
* [#9](https://github.com/rubocop
|
6
|
-
* [#10](https://github.com/rubocop
|
3
|
+
* [#11](https://github.com/rubocop/rubocop-minitest/pull/11): Add new `Minitest/RefuteNil` cop. ([@tejasbubane ][])
|
4
|
+
* [#8](https://github.com/rubocop/rubocop-minitest/pull/8): Add new `Minitest/AssertTruthy` cop. ([@abhaynikam ][])
|
5
|
+
* [#9](https://github.com/rubocop/rubocop-minitest/pull/9): Add new `Minitest/AssertIncludes` cop. ([@abhaynikam ][])
|
6
|
+
* [#10](https://github.com/rubocop/rubocop-minitest/pull/10): Add new `Minitest/AssertEmpty` cop. ([@abhaynikam ][])
|
7
7
|
|
8
8
|
[@tejasbubane]: https://github.com/tejasbubane
|
9
9
|
[@abhaynikam]: https://github.com/abhaynikam
|
data/relnotes/v0.2.1.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
### Bug fixes
|
2
2
|
|
3
|
-
* [#13](https://github.com/rubocop
|
3
|
+
* [#13](https://github.com/rubocop/rubocop-minitest/issues/13): Fix the execution target specified in `Include` parameter. ([@koic][])
|
4
4
|
|
5
5
|
[@koic]: https://github.com/koic
|
data/relnotes/v0.3.0.md
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
### New features
|
4
4
|
|
5
|
-
* [#15](https://github.com/rubocop
|
6
|
-
* [#18](https://github.com/rubocop
|
7
|
-
* [#20](https://github.com/rubocop
|
8
|
-
* [#21](https://github.com/rubocop
|
9
|
-
* [#27](https://github.com/rubocop
|
5
|
+
* [#15](https://github.com/rubocop/rubocop-minitest/pull/15): Add new `Minitest/RefuteIncludes` cop. ([@abhaynikam][])
|
6
|
+
* [#18](https://github.com/rubocop/rubocop-minitest/pull/18): Add new `Minitest/RefuteFalse` cop. ([@duduribeiro][])
|
7
|
+
* [#20](https://github.com/rubocop/rubocop-minitest/pull/20): Add new `Minitest/RefuteEmpty` cop. ([@abhaynikam][])
|
8
|
+
* [#21](https://github.com/rubocop/rubocop-minitest/pull/21): Add new `Minitest/RefuteEqual` cop. ([@duduribeiro][])
|
9
|
+
* [#27](https://github.com/rubocop/rubocop-minitest/pull/27): Add new `Minitest/AssertRespondTo` cop. ([@duduribeiro][])
|
10
10
|
|
11
11
|
### Bug fixes
|
12
12
|
|
13
|
-
* [#19](https://github.com/rubocop
|
13
|
+
* [#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][])
|
14
14
|
|
15
15
|
[@abhaynikam]: https://github.com/abhaynikam
|
16
16
|
[@duduribeiro]: https://github.com/duduribeiro
|
data/relnotes/v0.4.0.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
### New features
|
2
2
|
|
3
|
-
* [#29](https://github.com/rubocop
|
4
|
-
* [#31](https://github.com/rubocop
|
5
|
-
* [#34](https://github.com/rubocop
|
6
|
-
* [#35](https://github.com/rubocop
|
3
|
+
* [#29](https://github.com/rubocop/rubocop-minitest/pull/29): Add new `Minitest/RefuteRespondTo` cop. ([@herwinw][])
|
4
|
+
* [#31](https://github.com/rubocop/rubocop-minitest/pull/31): Add new `Minitest/AssertEqual` cop. ([@herwinw][])
|
5
|
+
* [#34](https://github.com/rubocop/rubocop-minitest/pull/34): Add new `Minitest/AssertInstanceOf` cop. ([@abhaynikam][])
|
6
|
+
* [#35](https://github.com/rubocop/rubocop-minitest/pull/35): Add new `Minitest/RefuteInstanceOf` cop. ([@abhaynikam][])
|
7
7
|
|
8
8
|
### Bug fixes
|
9
9
|
|
10
|
-
* [#25](https://github.com/rubocop
|
10
|
+
* [#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][])
|
11
11
|
|
12
12
|
[@herwinw]: https://github.com/herwinw
|
13
13
|
[@abhaynikam]: https://github.com/abhaynikam
|
data/relnotes/v0.4.1.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
### Bug fixes
|
2
2
|
|
3
|
-
* [#39](https://github.com/rubocop
|
3
|
+
* [#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][])
|
4
4
|
|
5
5
|
[@koic]: https://github.com/koic
|
data/relnotes/v0.5.0.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
### New features
|
2
2
|
|
3
|
-
* [#32](https://github.com/rubocop
|
3
|
+
* [#32](https://github.com/rubocop/rubocop-minitest/issues/32): Add new `Minitest/AssertEmptyLiteral` cop. ([@tejasbubane][])
|
4
4
|
|
5
5
|
[@tejasbubane]: https://github.com/tejasbubane
|
data/relnotes/v0.5.1.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
### Bug fixes
|
2
2
|
|
3
|
-
* [#42](https://github.com/rubocop
|
3
|
+
* [#42](https://github.com/rubocop/rubocop-minitest/issues/42): Fix an incorrect autocorrect for some cops of `Minitest` department when using heredoc message. ([@koic][])
|
4
4
|
|
5
5
|
[@koic]: https://github.com/koic
|
data/relnotes/v0.6.0.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
### New features
|
2
2
|
|
3
|
-
* [#49](https://github.com/rubocop
|
3
|
+
* [#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][])
|
4
4
|
|
5
5
|
[@fsateler]: https://github.com/fsateler
|
data/relnotes/v0.6.1.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
### Bug fixes
|
2
2
|
|
3
|
-
* [#52](https://github.com/rubocop
|
4
|
-
* [#52](https://github.com/rubocop
|
3
|
+
* [#52](https://github.com/rubocop/rubocop-minitest/issues/52): Make `Minitest/RefuteFalse` cop aware of `assert(!test)`. ([@koic][])
|
4
|
+
* [#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][])
|
5
5
|
|
6
6
|
[@koic]: https://github.com/koic
|
data/relnotes/v0.6.2.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
### Bug fixes
|
2
2
|
|
3
|
-
* [#55](https://github.com/rubocop
|
3
|
+
* [#55](https://github.com/rubocop/rubocop-minitest/issues/55): Fix an error for `Minitest/AssertIncludes` when using local variable argument. ([@koic][])
|
4
4
|
|
5
5
|
[@koic]: https://github.com/koic
|
data/relnotes/v0.7.0.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
### New features
|
2
2
|
|
3
|
-
* [#60](https://github.com/rubocop
|
3
|
+
* [#60](https://github.com/rubocop/rubocop-minitest/issues/60): Add new cop `Minitest/GlobalExpectations` to check for deprecated global expectations. ([@tejasbubane][])
|
4
4
|
|
5
5
|
### Bug fixes
|
6
6
|
|
7
|
-
* [#58](https://github.com/rubocop
|
8
|
-
* [#59](https://github.com/rubocop
|
9
|
-
* [#61](https://github.com/rubocop
|
10
|
-
* [#62](https://github.com/rubocop
|
7
|
+
* [#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][])
|
8
|
+
* [#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][])
|
9
|
+
* [#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][])
|
10
|
+
* [#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][])
|
11
11
|
|
12
12
|
[@tejasbubane]: https://github.com/tejasbubane
|
13
13
|
[@koic]: https://github.com/koic
|
data/relnotes/v0.8.0.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
### New features
|
2
2
|
|
3
|
-
* [#66](https://github.com/rubocop
|
3
|
+
* [#66](https://github.com/rubocop/rubocop-minitest/issues/66): Support all expectations of `Minitest::Expectations` for `Minitest/GlobalExpectations` cop. ([@koic][])
|
4
4
|
|
5
5
|
### Bug fixes
|
6
6
|
|
7
|
-
* [#60](https://github.com/rubocop
|
8
|
-
* [#69](https://github.com/rubocop
|
9
|
-
* [#71](https://github.com/rubocop
|
7
|
+
* [#60](https://github.com/rubocop/rubocop-minitest/issues/60): Fix `Minitest/GlobalExpectations` autocorrection for chained methods. ([@tejasbubane][])
|
8
|
+
* [#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][])
|
9
|
+
* [#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][])
|
10
10
|
|
11
11
|
[@koic]: https://github.com/koic
|
12
12
|
[@tejasbubane]: https://github.com/tejasbubane
|
data/relnotes/v0.8.1.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
### Bug fixes
|
2
2
|
|
3
|
-
* [#72](https://github.com/rubocop
|
3
|
+
* [#72](https://github.com/rubocop/rubocop-minitest/pull/72): Fix some false negatives for `Minitest/GlobalExpectations`. ([@andrykonchin][])
|
4
4
|
|
5
5
|
[@andrykonchin]: https://github.com/andrykonchin
|
data/relnotes/v0.9.0.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
### Bug fixes
|
2
2
|
|
3
|
-
* [#75](https://github.com/rubocop
|
3
|
+
* [#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][])
|
4
4
|
|
5
5
|
### Changes
|
6
6
|
|
7
|
-
* [#73](https://github.com/rubocop
|
8
|
-
* [#77](https://github.com/rubocop
|
7
|
+
* [#73](https://github.com/rubocop/rubocop-minitest/issues/73): The Minitest department works on file names end with `_test.rb` by default. ([@koic][])
|
8
|
+
* [#77](https://github.com/rubocop/rubocop-minitest/pull/77): **(BREAKING)** Drop support for Ruby 2.3. ([@koic][])
|
9
9
|
|
10
10
|
[@koic]: https://github.com/koic
|
data/rubocop-minitest.gemspec
CHANGED
@@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.required_ruby_version = '>= 2.4.0'
|
20
20
|
spec.metadata = {
|
21
21
|
'homepage_uri' => 'https://docs.rubocop.org/rubocop-minitest/',
|
22
|
-
'changelog_uri' => 'https://github.com/rubocop
|
23
|
-
'source_code_uri' => 'https://github.com/rubocop
|
22
|
+
'changelog_uri' => 'https://github.com/rubocop/rubocop-minitest/blob/master/CHANGELOG.md',
|
23
|
+
'source_code_uri' => 'https://github.com/rubocop/rubocop-minitest',
|
24
24
|
'documentation_uri' => "https://docs.rubocop.org/rubocop-minitest/#{RuboCop::Minitest::Version.document_version}",
|
25
|
-
'bug_tracker_uri' => 'https://github.com/rubocop
|
25
|
+
'bug_tracker_uri' => 'https://github.com/rubocop/rubocop-minitest/issues'
|
26
26
|
}
|
27
27
|
|
28
28
|
# Specify which files should be added to the gem when it is released.
|
@@ -34,6 +34,6 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
35
|
spec.require_paths = ['lib']
|
36
36
|
|
37
|
-
spec.add_runtime_dependency 'rubocop', '>= 0.
|
37
|
+
spec.add_runtime_dependency 'rubocop', '>= 0.90', '< 2.0'
|
38
38
|
spec.add_development_dependency 'minitest', '~> 5.11'
|
39
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-minitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-03-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubocop
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '0.
|
21
|
+
version: '0.90'
|
22
22
|
- - "<"
|
23
23
|
- !ruby/object:Gem::Version
|
24
24
|
version: '2.0'
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
requirements:
|
29
29
|
- - ">="
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version: '0.
|
31
|
+
version: '0.90'
|
32
32
|
- - "<"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '2.0'
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- lib/rubocop/cop/minitest/assert_respond_to.rb
|
101
101
|
- lib/rubocop/cop/minitest/assert_silent.rb
|
102
102
|
- lib/rubocop/cop/minitest/assert_truthy.rb
|
103
|
+
- lib/rubocop/cop/minitest/assert_with_expected_argument.rb
|
103
104
|
- lib/rubocop/cop/minitest/assertion_in_lifecycle_hook.rb
|
104
105
|
- lib/rubocop/cop/minitest/global_expectations.rb
|
105
106
|
- lib/rubocop/cop/minitest/literal_as_actual_argument.rb
|
@@ -132,6 +133,7 @@ files:
|
|
132
133
|
- relnotes/v0.10.1.md
|
133
134
|
- relnotes/v0.10.2.md
|
134
135
|
- relnotes/v0.10.3.md
|
136
|
+
- relnotes/v0.11.0.md
|
135
137
|
- relnotes/v0.2.0.md
|
136
138
|
- relnotes/v0.2.1.md
|
137
139
|
- relnotes/v0.3.0.md
|
@@ -154,10 +156,10 @@ licenses:
|
|
154
156
|
- MIT
|
155
157
|
metadata:
|
156
158
|
homepage_uri: https://docs.rubocop.org/rubocop-minitest/
|
157
|
-
changelog_uri: https://github.com/rubocop
|
158
|
-
source_code_uri: https://github.com/rubocop
|
159
|
-
documentation_uri: https://docs.rubocop.org/rubocop-minitest/0.
|
160
|
-
bug_tracker_uri: https://github.com/rubocop
|
159
|
+
changelog_uri: https://github.com/rubocop/rubocop-minitest/blob/master/CHANGELOG.md
|
160
|
+
source_code_uri: https://github.com/rubocop/rubocop-minitest
|
161
|
+
documentation_uri: https://docs.rubocop.org/rubocop-minitest/0.11
|
162
|
+
bug_tracker_uri: https://github.com/rubocop/rubocop-minitest/issues
|
161
163
|
post_install_message:
|
162
164
|
rdoc_options: []
|
163
165
|
require_paths:
|
@@ -173,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
175
|
- !ruby/object:Gem::Version
|
174
176
|
version: '0'
|
175
177
|
requirements: []
|
176
|
-
rubygems_version: 3.2.
|
178
|
+
rubygems_version: 3.2.13
|
177
179
|
signing_key:
|
178
180
|
specification_version: 4
|
179
181
|
summary: Automatic Minitest code style checking tool.
|