rubocop-minitest 0.10.1 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +18 -3
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +5 -1
  4. data/.rubocop.yml +5 -1
  5. data/.rubocop_todo.yml +8 -7
  6. data/CHANGELOG.md +95 -50
  7. data/CONTRIBUTING.md +3 -3
  8. data/Gemfile +2 -2
  9. data/LICENSE.txt +1 -1
  10. data/README.md +18 -2
  11. data/Rakefile +1 -1
  12. data/bin/console +2 -0
  13. data/config/default.yml +15 -4
  14. data/docs/antora.yml +1 -1
  15. data/docs/modules/ROOT/pages/cops.adoc +14 -1
  16. data/docs/modules/ROOT/pages/cops_minitest.adoc +79 -8
  17. data/docs/modules/ROOT/pages/index.adoc +1 -1
  18. data/legacy-docs/cops_minitest.md +16 -16
  19. data/legacy-docs/index.md +1 -1
  20. data/lib/rubocop/cop/minitest/assert_empty.rb +1 -1
  21. data/lib/rubocop/cop/minitest/assert_empty_literal.rb +12 -16
  22. data/lib/rubocop/cop/minitest/assert_equal.rb +1 -1
  23. data/lib/rubocop/cop/minitest/assert_in_delta.rb +4 -1
  24. data/lib/rubocop/cop/minitest/assert_includes.rb +1 -1
  25. data/lib/rubocop/cop/minitest/assert_instance_of.rb +1 -1
  26. data/lib/rubocop/cop/minitest/assert_kind_of.rb +1 -1
  27. data/lib/rubocop/cop/minitest/assert_match.rb +1 -1
  28. data/lib/rubocop/cop/minitest/assert_nil.rb +5 -11
  29. data/lib/rubocop/cop/minitest/assert_output.rb +1 -1
  30. data/lib/rubocop/cop/minitest/assert_path_exists.rb +6 -12
  31. data/lib/rubocop/cop/minitest/assert_respond_to.rb +1 -1
  32. data/lib/rubocop/cop/minitest/assert_silent.rb +8 -6
  33. data/lib/rubocop/cop/minitest/assert_truthy.rb +5 -11
  34. data/lib/rubocop/cop/minitest/assert_with_expected_argument.rb +41 -0
  35. data/lib/rubocop/cop/minitest/assertion_in_lifecycle_hook.rb +1 -1
  36. data/lib/rubocop/cop/minitest/global_expectations.rb +6 -7
  37. data/lib/rubocop/cop/minitest/literal_as_actual_argument.rb +15 -14
  38. data/lib/rubocop/cop/minitest/multiple_assertions.rb +2 -2
  39. data/lib/rubocop/cop/minitest/no_assertions.rb +48 -0
  40. data/lib/rubocop/cop/minitest/refute_empty.rb +1 -1
  41. data/lib/rubocop/cop/minitest/refute_equal.rb +7 -8
  42. data/lib/rubocop/cop/minitest/refute_false.rb +15 -22
  43. data/lib/rubocop/cop/minitest/refute_in_delta.rb +4 -1
  44. data/lib/rubocop/cop/minitest/refute_includes.rb +1 -1
  45. data/lib/rubocop/cop/minitest/refute_instance_of.rb +1 -1
  46. data/lib/rubocop/cop/minitest/refute_kind_of.rb +1 -1
  47. data/lib/rubocop/cop/minitest/refute_match.rb +1 -1
  48. data/lib/rubocop/cop/minitest/refute_nil.rb +4 -8
  49. data/lib/rubocop/cop/minitest/refute_path_exists.rb +6 -12
  50. data/lib/rubocop/cop/minitest/refute_respond_to.rb +1 -1
  51. data/lib/rubocop/cop/minitest/test_method_name.rb +18 -8
  52. data/lib/rubocop/cop/minitest/unspecified_exception.rb +1 -1
  53. data/lib/rubocop/cop/minitest_cops.rb +2 -0
  54. data/lib/rubocop/cop/mixin/in_delta_mixin.rb +5 -15
  55. data/lib/rubocop/cop/mixin/minitest_cop_rule.rb +13 -13
  56. data/lib/rubocop/cop/mixin/minitest_exploration_helpers.rb +27 -3
  57. data/lib/rubocop/minitest/version.rb +8 -1
  58. data/mkdocs.yml +2 -2
  59. data/relnotes/v0.1.0.md +1 -1
  60. data/relnotes/v0.10.0.md +12 -12
  61. data/relnotes/v0.10.1.md +1 -1
  62. data/relnotes/v0.10.2.md +5 -0
  63. data/relnotes/v0.10.3.md +5 -0
  64. data/relnotes/v0.11.0.md +16 -0
  65. data/relnotes/v0.11.1.md +5 -0
  66. data/relnotes/v0.12.0.md +10 -0
  67. data/relnotes/v0.2.0.md +4 -4
  68. data/relnotes/v0.2.1.md +1 -1
  69. data/relnotes/v0.3.0.md +6 -6
  70. data/relnotes/v0.4.0.md +5 -5
  71. data/relnotes/v0.4.1.md +1 -1
  72. data/relnotes/v0.5.0.md +1 -1
  73. data/relnotes/v0.5.1.md +1 -1
  74. data/relnotes/v0.6.0.md +1 -1
  75. data/relnotes/v0.6.1.md +2 -2
  76. data/relnotes/v0.6.2.md +1 -1
  77. data/relnotes/v0.7.0.md +5 -5
  78. data/relnotes/v0.8.0.md +4 -4
  79. data/relnotes/v0.8.1.md +1 -1
  80. data/relnotes/v0.9.0.md +3 -3
  81. data/rubocop-minitest.gemspec +7 -7
  82. data/tasks/cops_documentation.rake +24 -304
  83. metadata +28 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b6cb0236ad583a81b4b3d12fdf4bf9d83cb53cfb565973fd54e5ae8a9dbd487
4
- data.tar.gz: 6e41c1f11d6e20f29fbff140a71bf44c6e67db274b6cc30531220839e9c903b7
3
+ metadata.gz: a7a721b7443b19d1ff86922a0500d12daa296622bee5dc17ddcc2bdbf943245e
4
+ data.tar.gz: 14616b62fce87850843091ed66d9f76281a31038fcbf78bc5ea99a2b38c5b7db
5
5
  SHA512:
6
- metadata.gz: 2ea2746f324798c678144e938f35e392dc9062d4ccdbd184726d0dd122ddd564c993db2ab20c7d45f989f542adca8e692e40f6d2edeef1201e7415ab2c78b625
7
- data.tar.gz: 8448666265020b303754a109336f055402bdd375b020261a6d46f61d682c979e1e42edff409124bb9ee2cbc43744383f260c6b5908f55737c7b2fdefdf4856de
6
+ metadata.gz: bb0913607602b41d7c05e9ca5228b3dcecdd44ea10a7b5adcfb407b9c78801aa3f5d160dba9f2a629f95377c3d12001b68aac3b08cd3f44fa708255247989c71
7
+ data.tar.gz: 56a97c8ff0938d66b565b3578c5c698c85188bc7130fcf3ac7955df466b5c48a0abbed8ace45af2ea2c66aaa1f2635aaad6fb02de1f294da4a710e983aec1b94
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
- - rake_default:
27
- name: Ruby 2.4
28
- image: circleci/ruby:2.4
40
+ - documentation-checks
29
41
  - rake_default:
30
42
  name: Ruby 2.5
31
43
  image: circleci/ruby:2.5
@@ -35,6 +47,9 @@ workflows:
35
47
  - rake_default:
36
48
  name: Ruby 2.7
37
49
  image: circleci/ruby:2.7
50
+ - rake_default:
51
+ name: Ruby 3.0
52
+ image: circleci/ruby:3.0
38
53
  - rake_default:
39
54
  name: Ruby HEAD
40
55
  image: rubocophq/circleci-ruby-snapshot:latest # Nightly snapshot build
@@ -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
- 0.74.0 (using Parser 2.6.4.0, running on ruby 2.6.4 x86_64-darwin17)
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,7 +9,11 @@ require:
9
9
 
10
10
  AllCops:
11
11
  NewCops: enable
12
- TargetRubyVersion: 2.4
12
+ TargetRubyVersion: 2.5
13
+ SuggestExtensions: false
14
+
15
+ InternalAffairs/NodeMatcherDirective:
16
+ Enabled: false
13
17
 
14
18
  Naming/PredicateName:
15
19
  # Method define macros for dynamically generated method.
data/.rubocop_todo.yml CHANGED
@@ -1,16 +1,17 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2019-12-21 01:15:41 +0900 using RuboCop version 0.78.0.
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: 2
10
- Metrics/AbcSize:
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
13
+
14
+ # Offense count: 1
15
+ Style/DocumentDynamicEvalDefinition:
16
+ Exclude:
17
+ - 'lib/rubocop/cop/mixin/minitest_cop_rule.rb'
data/CHANGELOG.md CHANGED
@@ -2,159 +2,202 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.12.0 (2021-04-23)
6
+
7
+ ### New features
8
+
9
+ * [#124](https://github.com/rubocop/rubocop-minitest/pull/124): Add new `Minitest/NoAssertions` cop. ([@ghiculescu][])
10
+
11
+ ### Changes
12
+
13
+ * [#129](https://github.com/rubocop/rubocop-minitest/pull/129): Drop Ruby 2.4 support. ([@koic][])
14
+
15
+ ## 0.11.1 (2021-03-31)
16
+
17
+ ### Changes
18
+
19
+ * [#126](https://github.com/rubocop/rubocop-minitest/issues/126): Mark `Minitest/AssertWithExpectedArgument` as unsafe. ([@koic][])
20
+
21
+ ## 0.11.0 (2021-03-22)
22
+
23
+ ### New features
24
+
25
+ * [#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][])
26
+
27
+ ### Bug fixes
28
+
29
+ * [#122](https://github.com/rubocop/rubocop-minitest/pull/122): Fix `Minitest/TestMethodName` for tests with multiple assertions. ([@ghiculescu][])
30
+
31
+ ### Changes
32
+
33
+ * [#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][])
34
+ * [#125](https://github.com/rubocop/rubocop-minitest/pull/125): Require RuboCop 0.90 or higher. ([@koic][])
35
+
36
+ ## 0.10.3 (2021-01-12)
37
+
38
+ ### Bug fixes
39
+
40
+ * [#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][])
41
+
42
+ ## 0.10.2 (2020-12-27)
43
+
44
+ ### Bug fixes
45
+
46
+ * [#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][])
47
+
5
48
  ## 0.10.1 (2020-07-25)
6
49
 
7
50
  ### Bug fixes
8
51
 
9
- * [#106](https://github.com/rubocop-hq/rubocop-minitest/issues/106): Fix an error for `Minitest/AssertOutput` when using gvar at top level. ([@koic][])
52
+ * [#106](https://github.com/rubocop/rubocop-minitest/issues/106): Fix an error for `Minitest/AssertOutput` when using gvar at top level. ([@koic][])
10
53
 
11
54
  ## 0.10.0 (2020-07-12)
12
55
 
13
56
  ### New features
14
57
 
15
- * [#92](https://github.com/rubocop-hq/rubocop-minitest/pull/92): Add new `Minitest/LiteralAsActualArgument` cop. ([@fatkodima][], [@tsmmark][])
16
- * [#95](https://github.com/rubocop-hq/rubocop-minitest/pull/95): Add new `Minitest/AssertionInLifecycleHook` cop. ([@fatkodima][])
17
- * [#91](https://github.com/rubocop-hq/rubocop-minitest/pull/91): Add new `Minitest/AssertInDelta` and `Minitest/RefuteInDelta` cops. ([@fatkodima][])
18
- * [#89](https://github.com/rubocop-hq/rubocop-minitest/pull/89): Add new `Minitest/TestMethodName` cop. ([@fatkodima][])
19
- * [#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][])
20
- * [#88](https://github.com/rubocop-hq/rubocop-minitest/pull/88): Add new `Minitest/MultipleAssertions` cop. ([@fatkodima][])
21
- * [#87](https://github.com/rubocop-hq/rubocop-minitest/pull/87): Add new `Minitest/AssertSilent` cop. ([@fatkodima][])
22
- * [#96](https://github.com/rubocop-hq/rubocop-minitest/pull/96): Add new `Minitest/UnspecifiedException` cop. ([@fatkodima][])
23
- * [#98](https://github.com/rubocop-hq/rubocop-minitest/pull/98): Add new `Minitest/AssertOutput` cop. ([@fatkodima][])
24
- * [#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][])
25
- * [#85](https://github.com/rubocop-hq/rubocop-minitest/pull/85): Add autocorrect to `Rails/AssertEmptyLiteral` cop. ([@fatkodima][])
58
+ * [#92](https://github.com/rubocop/rubocop-minitest/pull/92): Add new `Minitest/LiteralAsActualArgument` cop. ([@fatkodima][], [@tsmmark][])
59
+ * [#95](https://github.com/rubocop/rubocop-minitest/pull/95): Add new `Minitest/AssertionInLifecycleHook` cop. ([@fatkodima][])
60
+ * [#91](https://github.com/rubocop/rubocop-minitest/pull/91): Add new `Minitest/AssertInDelta` and `Minitest/RefuteInDelta` cops. ([@fatkodima][])
61
+ * [#89](https://github.com/rubocop/rubocop-minitest/pull/89): Add new `Minitest/TestMethodName` cop. ([@fatkodima][])
62
+ * [#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][])
63
+ * [#88](https://github.com/rubocop/rubocop-minitest/pull/88): Add new `Minitest/MultipleAssertions` cop. ([@fatkodima][])
64
+ * [#87](https://github.com/rubocop/rubocop-minitest/pull/87): Add new `Minitest/AssertSilent` cop. ([@fatkodima][])
65
+ * [#96](https://github.com/rubocop/rubocop-minitest/pull/96): Add new `Minitest/UnspecifiedException` cop. ([@fatkodima][])
66
+ * [#98](https://github.com/rubocop/rubocop-minitest/pull/98): Add new `Minitest/AssertOutput` cop. ([@fatkodima][])
67
+ * [#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][])
68
+ * [#85](https://github.com/rubocop/rubocop-minitest/pull/85): Add autocorrect to `Rails/AssertEmptyLiteral` cop. ([@fatkodima][])
26
69
 
27
70
  ### Changes
28
71
 
29
- * [#104](https://github.com/rubocop-hq/rubocop-minitest/pull/104): Require RuboCop 0.87 or higher. ([@koic][])
72
+ * [#104](https://github.com/rubocop/rubocop-minitest/pull/104): Require RuboCop 0.87 or higher. ([@koic][])
30
73
 
31
74
  ## 0.9.0 (2020-04-13)
32
75
 
33
76
  ### Bug fixes
34
77
 
35
- * [#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][])
78
+ * [#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][])
36
79
 
37
80
  ### Changes
38
81
 
39
- * [#73](https://github.com/rubocop-hq/rubocop-minitest/issues/73): The Minitest department works on file names end with `_test.rb` by default. ([@koic][])
40
- * [#77](https://github.com/rubocop-hq/rubocop-minitest/pull/77): **(BREAKING)** Drop support for Ruby 2.3. ([@koic][])
82
+ * [#73](https://github.com/rubocop/rubocop-minitest/issues/73): The Minitest department works on file names end with `_test.rb` by default. ([@koic][])
83
+ * [#77](https://github.com/rubocop/rubocop-minitest/pull/77): **(BREAKING)** Drop support for Ruby 2.3. ([@koic][])
41
84
 
42
85
  ## 0.8.1 (2020-04-06)
43
86
 
44
87
  ### Bug fixes
45
88
 
46
- * [#72](https://github.com/rubocop-hq/rubocop-minitest/pull/72): Fix some false negatives for `Minitest/GlobalExpectations`. ([@andrykonchin][])
89
+ * [#72](https://github.com/rubocop/rubocop-minitest/pull/72): Fix some false negatives for `Minitest/GlobalExpectations`. ([@andrykonchin][])
47
90
 
48
91
  ## 0.8.0 (2020-03-24)
49
92
 
50
93
  ### New features
51
94
 
52
- * [#66](https://github.com/rubocop-hq/rubocop-minitest/issues/66): Support all expectations of `Minitest::Expectations` for `Minitest/GlobalExpectations` cop. ([@koic][])
95
+ * [#66](https://github.com/rubocop/rubocop-minitest/issues/66): Support all expectations of `Minitest::Expectations` for `Minitest/GlobalExpectations` cop. ([@koic][])
53
96
 
54
97
  ### Bug fixes
55
98
 
56
- * [#60](https://github.com/rubocop-hq/rubocop-minitest/issues/60): Fix `Minitest/GlobalExpectations` autocorrection for chained methods. ([@tejasbubane][])
57
- * [#69](https://github.com/rubocop-hq/rubocop-minitest/pull/69): Fix a false negative for `Minitest/GlobalExpectations` cop when using a variable or a hash index for receiver. ([@koic][])
58
- * [#71](https://github.com/rubocop-hq/rubocop-minitest/pull/71): Fix a false negative for `Minitest/AssertEqual` when an argument is enclosed in redundant parentheses. ([@koic][])
99
+ * [#60](https://github.com/rubocop/rubocop-minitest/issues/60): Fix `Minitest/GlobalExpectations` autocorrection for chained methods. ([@tejasbubane][])
100
+ * [#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][])
101
+ * [#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][])
59
102
 
60
103
  ## 0.7.0 (2020-03-09)
61
104
 
62
105
  ### New features
63
106
 
64
- * [#60](https://github.com/rubocop-hq/rubocop-minitest/issues/60): Add new cop `Minitest/GlobalExpectations` to check for deprecated global expectations. ([@tejasbubane][])
107
+ * [#60](https://github.com/rubocop/rubocop-minitest/issues/60): Add new cop `Minitest/GlobalExpectations` to check for deprecated global expectations. ([@tejasbubane][])
65
108
 
66
109
  ### Bug fixes
67
110
 
68
- * [#58](https://github.com/rubocop-hq/rubocop-minitest/pull/58): Fix a false negative for `Minitest/AssertMatch` and `Minitest/RefuteMatch` when an argument is enclosed in redundant parentheses. ([@koic][])
69
- * [#59](https://github.com/rubocop-hq/rubocop-minitest/pull/59): Fix a false negative for `Minitest/AssertRespondTo` and `Minitest/RefuteRespondTo` when an argument is enclosed in redundant parentheses. ([@koic][])
70
- * [#61](https://github.com/rubocop-hq/rubocop-minitest/pull/61): Fix a false negative for `Minitest/AssertInstanceOf` and `Minitest/RefuteInstanceOf` when an argument is enclosed in redundant parentheses. ([@koic][])
71
- * [#62](https://github.com/rubocop-hq/rubocop-minitest/pull/62): Fix a false negative for `Minitest/AssertEmpty` and `Minitest/RefuteEmpty` when an argument is enclosed in redundant parentheses. ([@koic][])
111
+ * [#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][])
112
+ * [#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][])
113
+ * [#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][])
114
+ * [#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][])
72
115
 
73
116
  ## 0.6.2 (2020-02-19)
74
117
 
75
118
  ### Bug fixes
76
119
 
77
- * [#55](https://github.com/rubocop-hq/rubocop-minitest/issues/55): Fix an error for `Minitest/AssertIncludes` when using local variable argument. ([@koic][])
120
+ * [#55](https://github.com/rubocop/rubocop-minitest/issues/55): Fix an error for `Minitest/AssertIncludes` when using local variable argument. ([@koic][])
78
121
 
79
122
  ## 0.6.1 (2020-02-18)
80
123
 
81
124
  ### Bug fixes
82
125
 
83
- * [#52](https://github.com/rubocop-hq/rubocop-minitest/issues/52): Make `Minitest/RefuteFalse` cop aware of `assert(!test)`. ([@koic][])
84
- * [#52](https://github.com/rubocop-hq/rubocop-minitest/issues/52): Fix a false negative for `Minitest/AssertIncludes` and `Minitest/RefuteIncludes` when an argument is enclosed in redundant parentheses. ([@koic][])
126
+ * [#52](https://github.com/rubocop/rubocop-minitest/issues/52): Make `Minitest/RefuteFalse` cop aware of `assert(!test)`. ([@koic][])
127
+ * [#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][])
85
128
 
86
129
  ## 0.6.0 (2020-02-07)
87
130
 
88
131
  ### New features
89
132
 
90
- * [#49](https://github.com/rubocop-hq/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][])
133
+ * [#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][])
91
134
 
92
135
  ## 0.5.1 (2019-12-25)
93
136
 
94
137
  ### Bug fixes
95
138
 
96
- * [#42](https://github.com/rubocop-hq/rubocop-minitest/issues/42): Fix an incorrect autocorrect for some cops of `Minitest` department when using heredoc message. ([@koic][])
139
+ * [#42](https://github.com/rubocop/rubocop-minitest/issues/42): Fix an incorrect autocorrect for some cops of `Minitest` department when using heredoc message. ([@koic][])
97
140
 
98
141
  ## 0.5.0 (2019-11-24)
99
142
 
100
143
  ### New features
101
144
 
102
- * [#32](https://github.com/rubocop-hq/rubocop-minitest/issues/32): Add new `Minitest/AssertEmptyLiteral` cop. ([@tejasbubane][])
145
+ * [#32](https://github.com/rubocop/rubocop-minitest/issues/32): Add new `Minitest/AssertEmptyLiteral` cop. ([@tejasbubane][])
103
146
 
104
147
  ## 0.4.1 (2019-11-10)
105
148
 
106
149
  ### Bug fixes
107
150
 
108
- * [#39](https://github.com/rubocop-hq/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][])
151
+ * [#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][])
109
152
 
110
153
  ## 0.4.0 (2019-11-07)
111
154
 
112
155
  ### New features
113
156
 
114
- * [#29](https://github.com/rubocop-hq/rubocop-minitest/pull/29): Add new `Minitest/RefuteRespondTo` cop. ([@herwinw][])
115
- * [#31](https://github.com/rubocop-hq/rubocop-minitest/pull/31): Add new `Minitest/AssertEqual` cop. ([@herwinw][])
116
- * [#34](https://github.com/rubocop-hq/rubocop-minitest/pull/34): Add new `Minitest/AssertInstanceOf` cop. ([@abhaynikam][])
117
- * [#35](https://github.com/rubocop-hq/rubocop-minitest/pull/35): Add new `Minitest/RefuteInstanceOf` cop. ([@abhaynikam][])
157
+ * [#29](https://github.com/rubocop/rubocop-minitest/pull/29): Add new `Minitest/RefuteRespondTo` cop. ([@herwinw][])
158
+ * [#31](https://github.com/rubocop/rubocop-minitest/pull/31): Add new `Minitest/AssertEqual` cop. ([@herwinw][])
159
+ * [#34](https://github.com/rubocop/rubocop-minitest/pull/34): Add new `Minitest/AssertInstanceOf` cop. ([@abhaynikam][])
160
+ * [#35](https://github.com/rubocop/rubocop-minitest/pull/35): Add new `Minitest/RefuteInstanceOf` cop. ([@abhaynikam][])
118
161
 
119
162
  ### Bug fixes
120
163
 
121
- * [#25](https://github.com/rubocop-hq/rubocop-minitest/issues/25): Add `Enabled: true` to `Minitest` department config to suppress `Warning: Minitest does not support Enabled parameter`. ([@koic][])
164
+ * [#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][])
122
165
 
123
166
  ## 0.3.0 (2019-10-13)
124
167
 
125
168
  ### New features
126
169
 
127
- * [#15](https://github.com/rubocop-hq/rubocop-minitest/pull/15): Add new `Minitest/RefuteIncludes` cop. ([@abhaynikam][])
128
- * [#18](https://github.com/rubocop-hq/rubocop-minitest/pull/18): Add new `Minitest/RefuteFalse` cop. ([@duduribeiro][])
129
- * [#20](https://github.com/rubocop-hq/rubocop-minitest/pull/20): Add new `Minitest/RefuteEmpty` cop. ([@abhaynikam][])
130
- * [#21](https://github.com/rubocop-hq/rubocop-minitest/pull/21): Add new `Minitest/RefuteEqual` cop. ([@duduribeiro][])
131
- * [#27](https://github.com/rubocop-hq/rubocop-minitest/pull/27): Add new `Minitest/AssertRespondTo` cop. ([@duduribeiro][])
170
+ * [#15](https://github.com/rubocop/rubocop-minitest/pull/15): Add new `Minitest/RefuteIncludes` cop. ([@abhaynikam][])
171
+ * [#18](https://github.com/rubocop/rubocop-minitest/pull/18): Add new `Minitest/RefuteFalse` cop. ([@duduribeiro][])
172
+ * [#20](https://github.com/rubocop/rubocop-minitest/pull/20): Add new `Minitest/RefuteEmpty` cop. ([@abhaynikam][])
173
+ * [#21](https://github.com/rubocop/rubocop-minitest/pull/21): Add new `Minitest/RefuteEqual` cop. ([@duduribeiro][])
174
+ * [#27](https://github.com/rubocop/rubocop-minitest/pull/27): Add new `Minitest/AssertRespondTo` cop. ([@duduribeiro][])
132
175
 
133
176
  ### Bug fixes
134
177
 
135
- * [#19](https://github.com/rubocop-hq/rubocop-minitest/pull/19): Fix a false negative for `Minitest/AssertIncludes` when using `include` method in arguments of `assert` method. ([@abhaynikam][])
178
+ * [#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][])
136
179
 
137
180
  ## 0.2.1 (2019-09-24)
138
181
 
139
182
  ### Bug fixes
140
183
 
141
- * [#13](https://github.com/rubocop-hq/rubocop-minitest/issues/13): Fix the execution target specified in `Include` parameter. ([@koic][])
184
+ * [#13](https://github.com/rubocop/rubocop-minitest/issues/13): Fix the execution target specified in `Include` parameter. ([@koic][])
142
185
 
143
186
  ## 0.2.0 (2019-09-21)
144
187
 
145
188
  ### New features
146
189
 
147
- * [#11](https://github.com/rubocop-hq/rubocop-minitest/pull/11): Add new `Minitest/RefuteNil` cop. ([@tejasbubane][])
148
- * [#8](https://github.com/rubocop-hq/rubocop-minitest/pull/8): Add new `Minitest/AssertTruthy` cop. ([@abhaynikam][])
149
- * [#9](https://github.com/rubocop-hq/rubocop-minitest/pull/9): Add new `Minitest/AssertIncludes` cop. ([@abhaynikam][])
150
- * [#10](https://github.com/rubocop-hq/rubocop-minitest/pull/10): Add new `Minitest/AssertEmpty` cop. ([@abhaynikam][])
190
+ * [#11](https://github.com/rubocop/rubocop-minitest/pull/11): Add new `Minitest/RefuteNil` cop. ([@tejasbubane][])
191
+ * [#8](https://github.com/rubocop/rubocop-minitest/pull/8): Add new `Minitest/AssertTruthy` cop. ([@abhaynikam][])
192
+ * [#9](https://github.com/rubocop/rubocop-minitest/pull/9): Add new `Minitest/AssertIncludes` cop. ([@abhaynikam][])
193
+ * [#10](https://github.com/rubocop/rubocop-minitest/pull/10): Add new `Minitest/AssertEmpty` cop. ([@abhaynikam][])
151
194
 
152
195
  ## 0.1.0 (2019-09-01)
153
196
 
154
197
  ### New features
155
198
 
156
199
  * Create RuboCop Minitest gem. ([@koic][])
157
- * [#6](https://github.com/rubocop-hq/rubocop-minitest/pull/6): Add new `Minitest/AssertNil` cop. ([@duduribeiro][])
200
+ * [#6](https://github.com/rubocop/rubocop-minitest/pull/6): Add new `Minitest/AssertNil` cop. ([@duduribeiro][])
158
201
 
159
202
  [@koic]: https://github.com/koic
160
203
  [@duduribeiro]: https://github.com/duduribeiro
@@ -165,3 +208,5 @@
165
208
  [@andrykonchin]: https://github.com/andrykonchin
166
209
  [@fatkodima]: https://github.com/fatkodima
167
210
  [@tsmmark]: https://github.com/tsmmark
211
+ [@cstyles]: https://github.com/cstyles
212
+ [@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-hq/rubocop-minitest/issues/716): Fixed a regression in the auto-correction logic of `MethodDefParentheses`. ([@bbatsov][])
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-hq/rubocop-minitest/issues/123): `.
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-hq/rubocop-minitest/issues
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
@@ -8,6 +8,6 @@ gemspec
8
8
 
9
9
  gem 'bump', require: false
10
10
  gem 'rake'
11
- gem 'rubocop', github: 'rubocop-hq/rubocop'
12
- gem 'rubocop-performance', '~> 1.6.0'
11
+ gem 'rubocop', github: 'rubocop/rubocop'
12
+ gem 'rubocop-performance', '~> 1.10.0'
13
13
  gem 'yard', '~> 0.9'
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019-2020 Bozhidar Batsov, Jonas Arvidsson, Koichi ITO
3
+ Copyright (c) 2019-2021 Bozhidar Batsov, Jonas Arvidsson, Koichi ITO
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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-hq/rubocop-minitest.svg?style=svg)](https://circleci.com/gh/rubocop-hq/rubocop-minitest)
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-hq/rubocop) extension focused on enforcing Minitest best practices and coding conventions.
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
@@ -77,6 +77,22 @@ Minitest/AssertNil:
77
77
 
78
78
  You can read a lot more about RuboCop Minitest in its [official docs](https://docs.rubocop.org/rubocop-minitest/).
79
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/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/rubocop-minitest)
92
+
93
+ [![Minitest Style Guide](https://img.shields.io/badge/code_style-community-brightgreen.svg)](https://minitest.rubystyle.guide)
94
+ ```
95
+
80
96
  ## Contributing
81
97
 
82
98
  Checkout the [contribution guidelines](CONTRIBUTING.md).
data/Rakefile CHANGED
@@ -61,7 +61,7 @@ task :new_cop, [:cop] do |_task, args|
61
61
  end
62
62
 
63
63
  def bump_minor_version
64
- major, minor, _patch = RuboCop::Minitest::VERSION.split('.')
64
+ major, minor, _patch = RuboCop::Minitest::Version::STRING.split('.')
65
65
 
66
66
  "#{major}.#{minor.succ}"
67
67
  end