rubocop-minitest 0.8.0 → 0.10.2
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 +15 -3
- data/.rubocop.yml +3 -1
- data/.rubocop_todo.yml +7 -13
- data/CHANGELOG.md +52 -0
- data/Gemfile +1 -1
- data/README.md +18 -2
- data/Rakefile +29 -0
- data/config/default.yml +96 -16
- data/docs/antora.yml +7 -0
- data/docs/modules/ROOT/nav.adoc +6 -0
- data/docs/modules/ROOT/pages/cops.adoc +48 -0
- data/docs/modules/ROOT/pages/cops_minitest.adoc +1014 -0
- data/docs/modules/ROOT/pages/index.adoc +5 -0
- data/docs/modules/ROOT/pages/installation.adoc +15 -0
- data/docs/modules/ROOT/pages/usage.adoc +32 -0
- data/{manual → legacy-docs}/cops.md +0 -0
- data/{manual → legacy-docs}/cops_minitest.md +0 -0
- data/{manual → legacy-docs}/index.md +0 -0
- data/{manual → legacy-docs}/installation.md +0 -0
- data/{manual → legacy-docs}/usage.md +0 -0
- data/lib/rubocop/cop/generator.rb +56 -0
- data/lib/rubocop/cop/minitest/assert_empty_literal.rb +15 -0
- data/lib/rubocop/cop/minitest/assert_in_delta.rb +27 -0
- data/lib/rubocop/cop/minitest/assert_kind_of.rb +25 -0
- data/lib/rubocop/cop/minitest/assert_output.rb +49 -0
- data/lib/rubocop/cop/minitest/assert_path_exists.rb +58 -0
- data/lib/rubocop/cop/minitest/assert_silent.rb +45 -0
- data/lib/rubocop/cop/minitest/assertion_in_lifecycle_hook.rb +43 -0
- data/lib/rubocop/cop/minitest/global_expectations.rb +27 -13
- data/lib/rubocop/cop/minitest/literal_as_actual_argument.rb +52 -0
- data/lib/rubocop/cop/minitest/multiple_assertions.rb +63 -0
- data/lib/rubocop/cop/minitest/refute_equal.rb +1 -1
- data/lib/rubocop/cop/minitest/refute_in_delta.rb +27 -0
- data/lib/rubocop/cop/minitest/refute_kind_of.rb +25 -0
- data/lib/rubocop/cop/minitest/refute_path_exists.rb +58 -0
- data/lib/rubocop/cop/minitest/test_method_name.rb +70 -0
- data/lib/rubocop/cop/minitest/unspecified_exception.rb +36 -0
- data/lib/rubocop/cop/minitest_cops.rb +15 -0
- data/lib/rubocop/cop/mixin/argument_range_helper.rb +10 -0
- data/lib/rubocop/cop/mixin/in_delta_mixin.rb +50 -0
- data/lib/rubocop/cop/mixin/minitest_cop_rule.rb +2 -4
- data/lib/rubocop/cop/mixin/minitest_exploration_helpers.rb +84 -0
- data/lib/rubocop/minitest/version.rb +8 -1
- data/mkdocs.yml +2 -2
- data/relnotes/v0.10.0.md +21 -0
- data/relnotes/v0.10.1.md +5 -0
- data/relnotes/v0.10.2.md +5 -0
- data/relnotes/v0.8.1.md +5 -0
- data/relnotes/v0.9.0.md +10 -0
- data/rubocop-minitest.gemspec +5 -5
- data/tasks/cops_documentation.rake +15 -264
- data/tasks/cut_release.rake +16 -0
- metadata +52 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ad49b7b1f0f0d916cb20400f58ea616d13663e99a57719d9b4a8a373a859a5d
|
4
|
+
data.tar.gz: c69990256d72a503f7bf072273fe077f7c2eea32fd6c7f13b2f2fe83f18c8780
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6899f78263d3d2728d5f0074d36c6813b8392d910524193f871ef1313af59fc78270ddb7ffa8b5b11c83c6c6f9bc6f0a8e57203dd54ffb3d81f1b036b025913
|
7
|
+
data.tar.gz: c402e470711d7432317c48c19c64e3b27c701855ceea1557abcf8418e6dd5ecfa33b0433372f9a73fa58ab956989aed7fbdb6b8f227e16b32272d9813d29c5d3
|
data/.circleci/config.yml
CHANGED
@@ -20,12 +20,24 @@ jobs:
|
|
20
20
|
- run: bundle install
|
21
21
|
- run: bundle exec rake
|
22
22
|
|
23
|
+
# Miscellaneous tasks
|
24
|
+
documentation-checks:
|
25
|
+
docker:
|
26
|
+
- image: circleci/ruby
|
27
|
+
steps:
|
28
|
+
- checkout
|
29
|
+
- run: bundle install
|
30
|
+
- run:
|
31
|
+
name: Check documentation syntax
|
32
|
+
command: bundle exec rake documentation_syntax_check
|
33
|
+
- run:
|
34
|
+
name: Build documentation and verify that doc files are in sync
|
35
|
+
command: bundle exec rake verify_cops_documentation
|
36
|
+
|
23
37
|
workflows:
|
24
38
|
build:
|
25
39
|
jobs:
|
26
|
-
-
|
27
|
-
name: Ruby 2.3
|
28
|
-
image: circleci/ruby:2.3
|
40
|
+
- documentation-checks
|
29
41
|
- rake_default:
|
30
42
|
name: Ruby 2.4
|
31
43
|
image: circleci/ruby:2.4
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,23 +1,17 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2020-10-29 02:01:16 UTC using RuboCop version 1.0.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
10
|
-
|
11
|
-
Max: 17
|
12
|
-
|
13
|
-
# Offense count: 19
|
14
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
9
|
+
# Offense count: 22
|
10
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
|
15
11
|
Metrics/MethodLength:
|
16
12
|
Max: 14
|
17
13
|
|
18
|
-
# Offense count:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
Layout/LineLength:
|
23
|
-
Max: 100
|
14
|
+
# Offense count: 1
|
15
|
+
Style/DocumentDynamicEvalDefinition:
|
16
|
+
Exclude:
|
17
|
+
- 'lib/rubocop/cop/mixin/minitest_cop_rule.rb'
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,55 @@
|
|
2
2
|
|
3
3
|
## master (unreleased)
|
4
4
|
|
5
|
+
## 0.10.2 (2020-12-27)
|
6
|
+
|
7
|
+
### Bug fixes
|
8
|
+
|
9
|
+
* [#113](https://github.com/rubocop-hq/rubocop-minitest/issues/113): This PR fixes an error for `Minitest/AssertEqual` and some cops when using `assert` with block argument. ([@koic][])
|
10
|
+
|
11
|
+
## 0.10.1 (2020-07-25)
|
12
|
+
|
13
|
+
### Bug fixes
|
14
|
+
|
15
|
+
* [#106](https://github.com/rubocop-hq/rubocop-minitest/issues/106): Fix an error for `Minitest/AssertOutput` when using gvar at top level. ([@koic][])
|
16
|
+
|
17
|
+
## 0.10.0 (2020-07-12)
|
18
|
+
|
19
|
+
### New features
|
20
|
+
|
21
|
+
* [#92](https://github.com/rubocop-hq/rubocop-minitest/pull/92): Add new `Minitest/LiteralAsActualArgument` cop. ([@fatkodima][], [@tsmmark][])
|
22
|
+
* [#95](https://github.com/rubocop-hq/rubocop-minitest/pull/95): Add new `Minitest/AssertionInLifecycleHook` cop. ([@fatkodima][])
|
23
|
+
* [#91](https://github.com/rubocop-hq/rubocop-minitest/pull/91): Add new `Minitest/AssertInDelta` and `Minitest/RefuteInDelta` cops. ([@fatkodima][])
|
24
|
+
* [#89](https://github.com/rubocop-hq/rubocop-minitest/pull/89): Add new `Minitest/TestMethodName` cop. ([@fatkodima][])
|
25
|
+
* [#83](https://github.com/rubocop-hq/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][])
|
26
|
+
* [#88](https://github.com/rubocop-hq/rubocop-minitest/pull/88): Add new `Minitest/MultipleAssertions` cop. ([@fatkodima][])
|
27
|
+
* [#87](https://github.com/rubocop-hq/rubocop-minitest/pull/87): Add new `Minitest/AssertSilent` cop. ([@fatkodima][])
|
28
|
+
* [#96](https://github.com/rubocop-hq/rubocop-minitest/pull/96): Add new `Minitest/UnspecifiedException` cop. ([@fatkodima][])
|
29
|
+
* [#98](https://github.com/rubocop-hq/rubocop-minitest/pull/98): Add new `Minitest/AssertOutput` cop. ([@fatkodima][])
|
30
|
+
* [#84](https://github.com/rubocop-hq/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][])
|
31
|
+
* [#85](https://github.com/rubocop-hq/rubocop-minitest/pull/85): Add autocorrect to `Rails/AssertEmptyLiteral` cop. ([@fatkodima][])
|
32
|
+
|
33
|
+
### Changes
|
34
|
+
|
35
|
+
* [#104](https://github.com/rubocop-hq/rubocop-minitest/pull/104): Require RuboCop 0.87 or higher. ([@koic][])
|
36
|
+
|
37
|
+
## 0.9.0 (2020-04-13)
|
38
|
+
|
39
|
+
### Bug fixes
|
40
|
+
|
41
|
+
* [#75](https://github.com/rubocop-hq/rubocop-minitest/issues/75): Fix a false negative for `Minitest/GlobalExpectations` when using global expectation methods with no arguments. ([@koic][])
|
42
|
+
|
43
|
+
### Changes
|
44
|
+
|
45
|
+
* [#73](https://github.com/rubocop-hq/rubocop-minitest/issues/73): The Minitest department works on file names end with `_test.rb` by default. ([@koic][])
|
46
|
+
* [#77](https://github.com/rubocop-hq/rubocop-minitest/pull/77): **(BREAKING)** Drop support for Ruby 2.3. ([@koic][])
|
47
|
+
|
48
|
+
## 0.8.1 (2020-04-06)
|
49
|
+
|
50
|
+
### Bug fixes
|
51
|
+
|
52
|
+
* [#72](https://github.com/rubocop-hq/rubocop-minitest/pull/72): Fix some false negatives for `Minitest/GlobalExpectations`. ([@andrykonchin][])
|
53
|
+
|
5
54
|
## 0.8.0 (2020-03-24)
|
6
55
|
|
7
56
|
### New features
|
@@ -119,3 +168,6 @@
|
|
119
168
|
[@abhaynikam]: https://github.com/abhaynikam
|
120
169
|
[@herwinw]: https://github.com/herwinw
|
121
170
|
[@fsateler]: https://github.com/fsateler
|
171
|
+
[@andrykonchin]: https://github.com/andrykonchin
|
172
|
+
[@fatkodima]: https://github.com/fatkodima
|
173
|
+
[@tsmmark]: https://github.com/tsmmark
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -62,7 +62,7 @@ end
|
|
62
62
|
|
63
63
|
All cops are located under
|
64
64
|
[`lib/rubocop/cop/minitest`](lib/rubocop/cop/minitest), and contain
|
65
|
-
examples/documentation. The documentation is published [here](https://docs.rubocop.org/
|
65
|
+
examples/documentation. The documentation is published [here](https://docs.rubocop.org/rubocop-minitest/).
|
66
66
|
|
67
67
|
In your `.rubocop.yml`, you may treat the Minitest cops just like any other
|
68
68
|
cop. For example:
|
@@ -75,7 +75,23 @@ Minitest/AssertNil:
|
|
75
75
|
|
76
76
|
## Documentation
|
77
77
|
|
78
|
-
You can read a lot more about RuboCop Minitest in its [official docs](https://docs.rubocop.org/
|
78
|
+
You can read a lot more about RuboCop Minitest in its [official docs](https://docs.rubocop.org/rubocop-minitest/).
|
79
|
+
|
80
|
+
## Readme Badge
|
81
|
+
|
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
|
+
|
84
|
+
[![Minitest Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop-hq/rubocop-minitest)
|
85
|
+
|
86
|
+
[![Minitest Style Guide](https://img.shields.io/badge/code_style-community-brightgreen.svg)](https://minitest.rubystyle.guide)
|
87
|
+
|
88
|
+
Here are the Markdown snippets for the two badges:
|
89
|
+
|
90
|
+
``` markdown
|
91
|
+
[![Minitest Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop-hq/rubocop-minitest)
|
92
|
+
|
93
|
+
[![Minitest Style Guide](https://img.shields.io/badge/code_style-community-brightgreen.svg)](https://minitest.rubystyle.guide)
|
94
|
+
```
|
79
95
|
|
80
96
|
## Contributing
|
81
97
|
|
data/Rakefile
CHANGED
@@ -15,6 +15,7 @@ end
|
|
15
15
|
|
16
16
|
require 'rubocop/rake_task'
|
17
17
|
require 'rake/testtask'
|
18
|
+
require_relative 'lib/rubocop/cop/generator'
|
18
19
|
|
19
20
|
Rake::TestTask.new do |t|
|
20
21
|
t.libs << 'test'
|
@@ -36,3 +37,31 @@ task default: %i[
|
|
36
37
|
test
|
37
38
|
internal_investigation
|
38
39
|
]
|
40
|
+
|
41
|
+
desc 'Generate a new cop template'
|
42
|
+
task :new_cop, [:cop] do |_task, args|
|
43
|
+
require 'rubocop'
|
44
|
+
|
45
|
+
cop_name = args.fetch(:cop) do
|
46
|
+
warn 'usage: bundle exec rake new_cop[Department/Name]'
|
47
|
+
exit!
|
48
|
+
end
|
49
|
+
|
50
|
+
github_user = `git config github.user`.chop
|
51
|
+
github_user = 'your_id' if github_user.empty?
|
52
|
+
|
53
|
+
generator = RuboCop::Cop::Generator.new(cop_name, github_user)
|
54
|
+
|
55
|
+
generator.write_source
|
56
|
+
generator.write_test
|
57
|
+
generator.inject_require(root_file_path: 'lib/rubocop/cop/minitest_cops.rb')
|
58
|
+
generator.inject_config(config_file_path: 'config/default.yml', version_added: bump_minor_version)
|
59
|
+
|
60
|
+
puts generator.todo
|
61
|
+
end
|
62
|
+
|
63
|
+
def bump_minor_version
|
64
|
+
major, minor, _patch = RuboCop::Minitest::VERSION.split('.')
|
65
|
+
|
66
|
+
"#{major}.#{minor.succ}"
|
67
|
+
end
|
data/config/default.yml
CHANGED
@@ -2,109 +2,189 @@ Minitest:
|
|
2
2
|
Enabled: true
|
3
3
|
Include:
|
4
4
|
- '**/test/**/*'
|
5
|
+
- '**/*_test.rb'
|
5
6
|
|
6
7
|
Minitest/AssertEmpty:
|
7
8
|
Description: 'This cop enforces the test to use `assert_empty` instead of using `assert(object.empty?)`.'
|
8
|
-
StyleGuide: 'https://
|
9
|
+
StyleGuide: 'https://minitest.rubystyle.guide#assert-empty'
|
9
10
|
Enabled: true
|
10
11
|
VersionAdded: '0.2'
|
11
12
|
|
12
13
|
Minitest/AssertEmptyLiteral:
|
13
14
|
Description: 'This cop enforces the test to use `assert_empty` instead of using `assert([], object)` or `assert({}, object)`.'
|
14
15
|
Enabled: true
|
16
|
+
SafeAutoCorrect: false
|
15
17
|
VersionAdded: '0.5'
|
18
|
+
VersionChanged: '0.10'
|
16
19
|
|
17
20
|
Minitest/AssertEqual:
|
18
21
|
Description: 'This cop enforces the test to use `assert_equal` instead of using `assert(expected == actual)`.'
|
19
|
-
StyleGuide: 'https://
|
22
|
+
StyleGuide: 'https://minitest.rubystyle.guide#assert-equal-arguments-order'
|
20
23
|
Enabled: true
|
21
24
|
VersionAdded: '0.4'
|
22
25
|
|
26
|
+
Minitest/AssertInDelta:
|
27
|
+
Description: 'This cop enforces the test to use `assert_in_delta` instead of using `assert_equal` to compare floats.'
|
28
|
+
StyleGuide: 'https://minitest.rubystyle.guide/#assert-in-delta'
|
29
|
+
Enabled: 'pending'
|
30
|
+
VersionAdded: '0.10'
|
31
|
+
|
32
|
+
Minitest/AssertionInLifecycleHook:
|
33
|
+
Description: 'This cop checks for usage of assertions in lifecycle hooks.'
|
34
|
+
Enabled: 'pending'
|
35
|
+
VersionAdded: '0.10'
|
36
|
+
|
23
37
|
Minitest/AssertMatch:
|
24
38
|
Description: 'This cop enforces the test to use `assert_match` instead of using `assert(matcher.match(object))`.'
|
25
|
-
StyleGuide: 'https://
|
39
|
+
StyleGuide: 'https://minitest.rubystyle.guide#assert-match'
|
26
40
|
Enabled: true
|
27
41
|
VersionAdded: '0.6'
|
28
42
|
|
29
43
|
Minitest/AssertIncludes:
|
30
44
|
Description: 'This cop enforces the test to use `assert_includes` instead of using `assert(collection.include?(object))`.'
|
31
|
-
StyleGuide: 'https://
|
45
|
+
StyleGuide: 'https://minitest.rubystyle.guide#assert-includes'
|
32
46
|
Enabled: true
|
33
47
|
VersionAdded: '0.2'
|
34
48
|
|
35
49
|
Minitest/AssertInstanceOf:
|
36
50
|
Description: 'This cop enforces the test to use `assert_instance_of(Class, object)` over `assert(object.instance_of?(Class))`'
|
37
|
-
StyleGuide: 'https://
|
51
|
+
StyleGuide: 'https://minitest.rubystyle.guide#assert-instance-of'
|
38
52
|
Enabled: true
|
39
53
|
VersionAdded: '0.4'
|
40
54
|
|
55
|
+
Minitest/AssertKindOf:
|
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-hq/minitest-style-guide#assert-kind-of'
|
58
|
+
Enabled: 'pending'
|
59
|
+
VersionAdded: '0.10'
|
60
|
+
|
41
61
|
Minitest/AssertNil:
|
42
62
|
Description: 'This cop enforces the test to use `assert_nil` instead of using `assert_equal(nil, something)`.'
|
43
|
-
StyleGuide: 'https://
|
63
|
+
StyleGuide: 'https://minitest.rubystyle.guide#assert-nil'
|
44
64
|
Enabled: true
|
45
65
|
VersionAdded: '0.1'
|
46
66
|
|
67
|
+
Minitest/AssertOutput:
|
68
|
+
Description: 'This cop checks for opportunities to use `assert_output`.'
|
69
|
+
StyleGuide: 'https://minitest.rubystyle.guide/#assert-output'
|
70
|
+
Enabled: 'pending'
|
71
|
+
VersionAdded: '0.10'
|
72
|
+
|
73
|
+
Minitest/AssertPathExists:
|
74
|
+
Description: 'This cop enforces the test to use `assert_path_exists` instead of using `assert(File.exist?(path))`.'
|
75
|
+
StyleGuide: 'https://minitest.rubystyle.guide/#assert-path-exists'
|
76
|
+
Enabled: 'pending'
|
77
|
+
VersionAdded: '0.10'
|
78
|
+
|
47
79
|
Minitest/AssertRespondTo:
|
48
80
|
Description: 'This cop enforces the test to use `assert_respond_to(object, :do_something)` over `assert(object.respond_to?(:do_something))`.'
|
49
|
-
StyleGuide: 'https://
|
81
|
+
StyleGuide: 'https://minitest.rubystyle.guide#assert-responds-to-method'
|
50
82
|
Enabled: true
|
51
83
|
VersionAdded: '0.3'
|
52
84
|
|
85
|
+
Minitest/AssertSilent:
|
86
|
+
Description: "This cop enforces the test to use `assert_silent { ... }` instead of using `assert_output('', '') { ... }`."
|
87
|
+
StyleGuide: 'https://github.com/rubocop-hq/minitest-style-guide#assert-silent'
|
88
|
+
Enabled: 'pending'
|
89
|
+
VersionAdded: '0.10'
|
90
|
+
|
53
91
|
Minitest/AssertTruthy:
|
54
92
|
Description: 'This cop enforces the test to use `assert(actual)` instead of using `assert_equal(true, actual)`.'
|
55
|
-
StyleGuide: 'https://
|
93
|
+
StyleGuide: 'https://minitest.rubystyle.guide#assert-truthy'
|
56
94
|
Enabled: true
|
57
95
|
VersionAdded: '0.2'
|
58
96
|
|
59
97
|
Minitest/GlobalExpectations:
|
60
98
|
Description: 'This cop checks for deprecated global expectations.'
|
99
|
+
StyleGuide: 'https://minitest.rubystyle.guide#global-expectations'
|
61
100
|
Enabled: true
|
62
101
|
VersionAdded: '0.7'
|
63
102
|
|
103
|
+
Minitest/LiteralAsActualArgument:
|
104
|
+
Description: 'This cop enforces correct order of `expected` and `actual` arguments for `assert_equal`.'
|
105
|
+
StyleGuide: 'https://minitest.rubystyle.guide/#assert-equal-arguments-order'
|
106
|
+
Enabled: 'pending'
|
107
|
+
VersionAdded: '0.10'
|
108
|
+
|
109
|
+
Minitest/MultipleAssertions:
|
110
|
+
Description: 'This cop checks if test cases contain too many assertion calls.'
|
111
|
+
Enabled: 'pending'
|
112
|
+
VersionAdded: '0.10'
|
113
|
+
Max: 3
|
114
|
+
|
64
115
|
Minitest/RefuteEmpty:
|
65
116
|
Description: 'This cop enforces to use `refute_empty` instead of using `refute(object.empty?)`.'
|
66
|
-
StyleGuide: 'https://
|
117
|
+
StyleGuide: 'https://minitest.rubystyle.guide#refute-empty'
|
67
118
|
Enabled: true
|
68
119
|
VersionAdded: '0.3'
|
69
120
|
|
70
121
|
Minitest/RefuteEqual:
|
71
122
|
Description: 'Check if your test uses `refute_equal` instead of `assert(expected != object)` or `assert(! expected == object))`.'
|
72
|
-
StyleGuide: 'https://
|
123
|
+
StyleGuide: 'https://minitest.rubystyle.guide#refute-equal'
|
73
124
|
Enabled: true
|
74
125
|
VersionAdded: '0.3'
|
75
126
|
|
76
127
|
Minitest/RefuteFalse:
|
77
128
|
Description: 'Check if your test uses `refute(actual)` instead of `assert_equal(false, actual)`.'
|
78
|
-
StyleGuide: 'https://
|
129
|
+
StyleGuide: 'https://minitest.rubystyle.guide#refute-false'
|
79
130
|
Enabled: true
|
80
131
|
VersionAdded: '0.3'
|
81
132
|
|
133
|
+
Minitest/RefuteInDelta:
|
134
|
+
Description: 'This cop enforces the test to use `refute_in_delta` instead of using `refute_equal` to compare floats.'
|
135
|
+
StyleGuide: 'https://minitest.rubystyle.guide/#refute-in-delta'
|
136
|
+
Enabled: 'pending'
|
137
|
+
VersionAdded: '0.10'
|
138
|
+
|
82
139
|
Minitest/RefuteIncludes:
|
83
140
|
Description: 'This cop enforces the test to use `refute_includes` instead of using `refute(collection.include?(object))`.'
|
84
|
-
StyleGuide: 'https://
|
141
|
+
StyleGuide: 'https://minitest.rubystyle.guide#refute-includes'
|
85
142
|
Enabled: true
|
86
143
|
VersionAdded: '0.3'
|
87
144
|
|
88
145
|
Minitest/RefuteMatch:
|
89
146
|
Description: 'This cop enforces the test to use `refute_match` instead of using `refute(matcher.match(object))`.'
|
90
|
-
StyleGuide: 'https://
|
147
|
+
StyleGuide: 'https://minitest.rubystyle.guide#refute-match'
|
91
148
|
Enabled: true
|
92
149
|
VersionAdded: '0.6'
|
93
150
|
|
94
151
|
Minitest/RefuteInstanceOf:
|
95
152
|
Description: 'This cop enforces the test to use `refute_instance_of(Class, object)` over `refute(object.instance_of?(Class))`.'
|
96
|
-
StyleGuide: 'https://
|
153
|
+
StyleGuide: 'https://minitest.rubystyle.guide#refute-instance-of'
|
97
154
|
Enabled: true
|
98
155
|
VersionAdded: '0.4'
|
99
156
|
|
157
|
+
Minitest/RefuteKindOf:
|
158
|
+
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-hq/minitest-style-guide#refute-kind-of'
|
160
|
+
Enabled: 'pending'
|
161
|
+
VersionAdded: '0.10'
|
162
|
+
|
100
163
|
Minitest/RefuteNil:
|
101
164
|
Description: 'This cop enforces the test to use `refute_nil` instead of using `refute_equal(nil, something)`.'
|
102
|
-
StyleGuide: 'https://
|
165
|
+
StyleGuide: 'https://minitest.rubystyle.guide#refute-nil'
|
103
166
|
Enabled: true
|
104
167
|
VersionAdded: '0.2'
|
105
168
|
|
169
|
+
Minitest/RefutePathExists:
|
170
|
+
Description: 'This cop enforces the test to use `refute_path_exists` instead of using `refute(File.exist?(path))`.'
|
171
|
+
StyleGuide: 'https://minitest.rubystyle.guide/#refute-path-exists'
|
172
|
+
Enabled: 'pending'
|
173
|
+
VersionAdded: '0.10'
|
174
|
+
|
106
175
|
Minitest/RefuteRespondTo:
|
107
176
|
Description: 'This cop enforces the test to use `refute_respond_to(object, :do_something)` over `refute(object.respond_to?(:do_something))`.'
|
108
|
-
StyleGuide: 'https://
|
177
|
+
StyleGuide: 'https://minitest.rubystyle.guide#refute-respond-to'
|
109
178
|
Enabled: true
|
110
179
|
VersionAdded: '0.4'
|
180
|
+
|
181
|
+
Minitest/TestMethodName:
|
182
|
+
Description: 'This cop enforces that test method names start with `test_` prefix.'
|
183
|
+
Enabled: 'pending'
|
184
|
+
VersionAdded: '0.10'
|
185
|
+
|
186
|
+
Minitest/UnspecifiedException:
|
187
|
+
Description: 'This cop checks for a specified error in `assert_raises`.'
|
188
|
+
StyleGuide: 'https://minitest.rubystyle.guide#unspecified-exception'
|
189
|
+
Enabled: 'pending'
|
190
|
+
VersionAdded: '0.10'
|
data/docs/antora.yml
ADDED