rubocop-minitest 0.10.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +18 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +5 -1
  4. data/.rubocop.yml +4 -0
  5. data/.rubocop_todo.yml +8 -7
  6. data/CHANGELOG.md +90 -49
  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 +10 -4
  14. data/docs/antora.yml +1 -1
  15. data/docs/modules/ROOT/pages/cops.adoc +13 -1
  16. data/docs/modules/ROOT/pages/cops_minitest.adoc +47 -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_literal.rb +9 -8
  21. data/lib/rubocop/cop/minitest/assert_in_delta.rb +2 -0
  22. data/lib/rubocop/cop/minitest/assert_nil.rb +1 -0
  23. data/lib/rubocop/cop/minitest/assert_path_exists.rb +1 -0
  24. data/lib/rubocop/cop/minitest/assert_truthy.rb +1 -0
  25. data/lib/rubocop/cop/minitest/assert_with_expected_argument.rb +41 -0
  26. data/lib/rubocop/cop/minitest/global_expectations.rb +2 -0
  27. data/lib/rubocop/cop/minitest/literal_as_actual_argument.rb +1 -0
  28. data/lib/rubocop/cop/minitest/refute_equal.rb +2 -1
  29. data/lib/rubocop/cop/minitest/refute_false.rb +1 -0
  30. data/lib/rubocop/cop/minitest/refute_in_delta.rb +2 -0
  31. data/lib/rubocop/cop/minitest/refute_nil.rb +1 -0
  32. data/lib/rubocop/cop/minitest/refute_path_exists.rb +1 -0
  33. data/lib/rubocop/cop/minitest/test_method_name.rb +10 -1
  34. data/lib/rubocop/cop/minitest_cops.rb +1 -0
  35. data/lib/rubocop/cop/mixin/minitest_cop_rule.rb +2 -1
  36. data/lib/rubocop/cop/mixin/minitest_exploration_helpers.rb +14 -1
  37. data/lib/rubocop/minitest/version.rb +8 -1
  38. data/mkdocs.yml +2 -2
  39. data/relnotes/v0.1.0.md +1 -1
  40. data/relnotes/v0.10.0.md +12 -12
  41. data/relnotes/v0.10.1.md +5 -0
  42. data/relnotes/v0.10.2.md +5 -0
  43. data/relnotes/v0.10.3.md +5 -0
  44. data/relnotes/v0.11.0.md +16 -0
  45. data/relnotes/v0.11.1.md +5 -0
  46. data/relnotes/v0.2.0.md +4 -4
  47. data/relnotes/v0.2.1.md +1 -1
  48. data/relnotes/v0.3.0.md +6 -6
  49. data/relnotes/v0.4.0.md +5 -5
  50. data/relnotes/v0.4.1.md +1 -1
  51. data/relnotes/v0.5.0.md +1 -1
  52. data/relnotes/v0.5.1.md +1 -1
  53. data/relnotes/v0.6.0.md +1 -1
  54. data/relnotes/v0.6.1.md +2 -2
  55. data/relnotes/v0.6.2.md +1 -1
  56. data/relnotes/v0.7.0.md +5 -5
  57. data/relnotes/v0.8.0.md +4 -4
  58. data/relnotes/v0.8.1.md +1 -1
  59. data/relnotes/v0.9.0.md +3 -3
  60. data/rubocop-minitest.gemspec +6 -6
  61. data/tasks/cops_documentation.rake +15 -295
  62. data/tasks/cut_release.rake +1 -1
  63. metadata +26 -14
@@ -25,6 +25,7 @@ module RuboCop
25
25
  '`assert_equal(false, %<arguments>s)`.'
26
26
  MSG_FOR_ASSERT = 'Prefer using `refute(%<arguments>s)` over ' \
27
27
  '`assert(!%<arguments>s)`.'
28
+ RESTRICT_ON_SEND = %i[assert_equal assert].freeze
28
29
 
29
30
  def_node_matcher :assert_equal_with_false, <<~PATTERN
30
31
  (send nil? :assert_equal false $_ $...)
@@ -18,6 +18,8 @@ module RuboCop
18
18
  class RefuteInDelta < Cop
19
19
  include InDeltaMixin
20
20
 
21
+ RESTRICT_ON_SEND = %i[refute_equal].freeze
22
+
21
23
  def_node_matcher :equal_floats_call, <<~PATTERN
22
24
  (send nil? :refute_equal $_ $_ $...)
23
25
  PATTERN
@@ -20,6 +20,7 @@ module RuboCop
20
20
 
21
21
  MSG = 'Prefer using `refute_nil(%<arguments>s)` over ' \
22
22
  '`refute_equal(nil, %<arguments>s)`.'
23
+ RESTRICT_ON_SEND = %i[refute_equal].freeze
23
24
 
24
25
  def_node_matcher :refute_equal_with_nil, <<~PATTERN
25
26
  (send nil? :refute_equal nil $_ $...)
@@ -17,6 +17,7 @@ module RuboCop
17
17
  #
18
18
  class RefutePathExists < Cop
19
19
  MSG = 'Prefer using `%<good_method>s` over `%<bad_method>s`.'
20
+ RESTRICT_ON_SEND = %i[refute].freeze
20
21
 
21
22
  def_node_matcher :refute_file_exists, <<~PATTERN
22
23
  (send nil? :refute
@@ -4,6 +4,7 @@ module RuboCop
4
4
  module Cop
5
5
  module Minitest
6
6
  # This cop enforces that test method names start with `test_` prefix.
7
+ # It aims to prevent tests that aren't executed by forgetting to start test method name with `test_`.
7
8
  #
8
9
  # @example
9
10
  # # bad
@@ -20,6 +21,12 @@ module RuboCop
20
21
  # end
21
22
  # end
22
23
  #
24
+ # # good
25
+ # class FooTest < Minitest::Test
26
+ # def helper_method(argument)
27
+ # end
28
+ # end
29
+ #
23
30
  class TestMethodName < Cop
24
31
  include MinitestExplorationHelpers
25
32
  include DefNode
@@ -54,7 +61,9 @@ module RuboCop
54
61
  end
55
62
 
56
63
  def offense?(node)
57
- public?(node) && !test_method_name?(node) && !lifecycle_hook_method?(node)
64
+ return false if assertions(node).none?
65
+
66
+ public?(node) && node.arguments.empty? && !test_method_name?(node) && !lifecycle_hook_method?(node)
58
67
  end
59
68
 
60
69
  def public?(node)
@@ -8,6 +8,7 @@ require_relative 'minitest/assert_empty'
8
8
  require_relative 'minitest/assert_empty_literal'
9
9
  require_relative 'minitest/assert_equal'
10
10
  require_relative 'minitest/assert_in_delta'
11
+ require_relative 'minitest/assert_with_expected_argument'
11
12
  require_relative 'minitest/assertion_in_lifecycle_hook'
12
13
  require_relative 'minitest/assert_kind_of'
13
14
  require_relative 'minitest/assert_nil'
@@ -29,6 +29,7 @@ module RuboCop
29
29
 
30
30
  MSG = 'Prefer using `#{preferred_method}(%<new_arguments>s)` over ' \
31
31
  '`#{assertion_method}(%<original_arguments>s)`.'
32
+ RESTRICT_ON_SEND = %i[#{assertion_method}].freeze
32
33
 
33
34
  def on_send(node)
34
35
  return unless node.method?(:#{assertion_method})
@@ -57,7 +58,7 @@ module RuboCop
57
58
  private
58
59
 
59
60
  def peel_redundant_parentheses_from(arguments)
60
- return arguments unless arguments.first.begin_type?
61
+ return arguments unless arguments.first&.begin_type?
61
62
 
62
63
  peel_redundant_parentheses_from(arguments.first.children)
63
64
  end
@@ -10,6 +10,15 @@ module RuboCop
10
10
 
11
11
  ASSERTION_PREFIXES = %w[assert refute].freeze
12
12
 
13
+ ASSERTION_METHODS = %i[
14
+ assert assert_empty assert_equal assert_in_delta assert_in_epsilon assert_includes assert_instance_of
15
+ assert_kind_of assert_match assert_nil assert_operator assert_output assert_path_exists assert_predicate
16
+ assert_raises assert_respond_to assert_same assert_send assert_silent assert_throws
17
+ refute refute_empty refute_equal refute_in_delta refute_in_epsilon refute_includes refute_instance_of
18
+ refute_kind_of refute_match refute_nil refute_operator refute_path_exists refute_predicate
19
+ refute_respond_to refute_same
20
+ ].freeze
21
+
13
22
  LIFECYCLE_HOOK_METHODS = %i[
14
23
  before_setup
15
24
  setup
@@ -26,7 +35,7 @@ module RuboCop
26
35
  end
27
36
 
28
37
  def test_case?(node)
29
- return false unless node.def_type? && test_case_name?(node.method_name)
38
+ return false unless node&.def_type? && test_case_name?(node.method_name)
30
39
 
31
40
  class_ancestor = node.each_ancestor(:class).first
32
41
  test_class?(class_ancestor)
@@ -76,6 +85,10 @@ module RuboCop
76
85
  ASSERTION_PREFIXES.any? { |prefix| node.method_name.to_s.start_with?(prefix) }
77
86
  end
78
87
 
88
+ def assertion_method?(method_name)
89
+ ASSERTION_METHODS.include?(method_name)
90
+ end
91
+
79
92
  def lifecycle_hook_method?(node)
80
93
  node.def_type? && LIFECYCLE_HOOK_METHODS.include?(node.method_name)
81
94
  end
@@ -2,6 +2,13 @@
2
2
 
3
3
  module RuboCop
4
4
  module Minitest
5
- VERSION = '0.10.0'
5
+ # This module holds the RuboCop Minitest version information.
6
+ module Version
7
+ STRING = '0.11.1'
8
+
9
+ def self.document_version
10
+ STRING.match('\d+\.\d+').to_s
11
+ end
12
+ end
6
13
  end
7
14
  end
data/mkdocs.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  site_name: "A RuboCop extension focused on enforcing Minitest best practices and coding conventions."
2
- repo_url: https://github.com/rubocop-hq/rubocop-minitest
2
+ repo_url: https://github.com/rubocop/rubocop-minitest
3
3
  edit_uri: edit/master/legacy-docs/
4
- copyright: "Copyright &copy; 2019 Bozhidar Batsov, Jonas Arvidsson, Koichi ITO, and RuboCop contributors"
4
+ copyright: "Copyright &copy; 2021 Bozhidar Batsov, Jonas Arvidsson, Koichi ITO, and RuboCop contributors"
5
5
  docs_dir: legacy-docs
6
6
  pages:
7
7
  - Home: index.md
data/relnotes/v0.1.0.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ### New features
2
2
 
3
3
  * Create RuboCop Minitest gem. ([@koic][])
4
- * [#6](https://github.com/rubocop-hq/rubocop-minitest/pull/6): Add new `Minitest/AssertNil` cop. ([@duduribeiro ][])
4
+ * [#6](https://github.com/rubocop/rubocop-minitest/pull/6): Add new `Minitest/AssertNil` cop. ([@duduribeiro ][])
5
5
 
6
6
  [@koic]: https://github.com/koic
7
7
  [@duduribeiro]: https://github.com/duduribeiro
data/relnotes/v0.10.0.md CHANGED
@@ -1,20 +1,20 @@
1
1
  ### New features
2
2
 
3
- * [#92](https://github.com/rubocop-hq/rubocop-minitest/pull/92): Add new `Minitest/LiteralAsActualArgument` cop. ([@fatkodima][], [@tsmmark][])
4
- * [#95](https://github.com/rubocop-hq/rubocop-minitest/pull/95): Add new `Minitest/AssertionInLifecycleHook` cop. ([@fatkodima][])
5
- * [#91](https://github.com/rubocop-hq/rubocop-minitest/pull/91): Add new `Minitest/AssertInDelta` and `Minitest/RefuteInDelta` cops. ([@fatkodima][])
6
- * [#89](https://github.com/rubocop-hq/rubocop-minitest/pull/89): Add new `Minitest/TestMethodName` cop. ([@fatkodima][])
7
- * [#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][])
8
- * [#88](https://github.com/rubocop-hq/rubocop-minitest/pull/88): Add new `Minitest/MultipleAssertions` cop. ([@fatkodima][])
9
- * [#87](https://github.com/rubocop-hq/rubocop-minitest/pull/87): Add new `Minitest/AssertSilent` cop. ([@fatkodima][])
10
- * [#96](https://github.com/rubocop-hq/rubocop-minitest/pull/96): Add new `Minitest/UnspecifiedException` cop. ([@fatkodima][])
11
- * [#98](https://github.com/rubocop-hq/rubocop-minitest/pull/98): Add new `Minitest/AssertOutput` cop. ([@fatkodima][])
12
- * [#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][])
13
- * [#85](https://github.com/rubocop-hq/rubocop-minitest/pull/85): Add autocorrect to `Rails/AssertEmptyLiteral` cop. ([@fatkodima][])
3
+ * [#92](https://github.com/rubocop/rubocop-minitest/pull/92): Add new `Minitest/LiteralAsActualArgument` cop. ([@fatkodima][], [@tsmmark][])
4
+ * [#95](https://github.com/rubocop/rubocop-minitest/pull/95): Add new `Minitest/AssertionInLifecycleHook` cop. ([@fatkodima][])
5
+ * [#91](https://github.com/rubocop/rubocop-minitest/pull/91): Add new `Minitest/AssertInDelta` and `Minitest/RefuteInDelta` cops. ([@fatkodima][])
6
+ * [#89](https://github.com/rubocop/rubocop-minitest/pull/89): Add new `Minitest/TestMethodName` cop. ([@fatkodima][])
7
+ * [#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][])
8
+ * [#88](https://github.com/rubocop/rubocop-minitest/pull/88): Add new `Minitest/MultipleAssertions` cop. ([@fatkodima][])
9
+ * [#87](https://github.com/rubocop/rubocop-minitest/pull/87): Add new `Minitest/AssertSilent` cop. ([@fatkodima][])
10
+ * [#96](https://github.com/rubocop/rubocop-minitest/pull/96): Add new `Minitest/UnspecifiedException` cop. ([@fatkodima][])
11
+ * [#98](https://github.com/rubocop/rubocop-minitest/pull/98): Add new `Minitest/AssertOutput` cop. ([@fatkodima][])
12
+ * [#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][])
13
+ * [#85](https://github.com/rubocop/rubocop-minitest/pull/85): Add autocorrect to `Rails/AssertEmptyLiteral` cop. ([@fatkodima][])
14
14
 
15
15
  ### Changes
16
16
 
17
- * [#104](https://github.com/rubocop-hq/rubocop-minitest/pull/104): Require RuboCop 0.87 or higher. ([@koic][])
17
+ * [#104](https://github.com/rubocop/rubocop-minitest/pull/104): Require RuboCop 0.87 or higher. ([@koic][])
18
18
 
19
19
  [@fatkodima]: https://github.com/fatkodima
20
20
  [@tsmmark]: https://github.com/tsmmark
@@ -0,0 +1,5 @@
1
+ ### Bug fixes
2
+
3
+ * [#106](https://github.com/rubocop/rubocop-minitest/issues/106): Fix an error for `Minitest/AssertOutput` when using gvar at top level. ([@koic][])
4
+
5
+ [@koic]: https://github.com/koic
@@ -0,0 +1,5 @@
1
+ ### Bug fixes
2
+
3
+ * [#113](https://github.com/rubocop/rubocop-minitest/issues/113): This PR fixes an error for `Minitest/AssertEqual` and some cops when using `assert` with block argument. ([@koic][])
4
+
5
+ [@koic]: https://github.com/koic
@@ -0,0 +1,5 @@
1
+ ### Bug fixes
2
+
3
+ * [#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][])
4
+
5
+ [@koic]: https://github.com/koic
@@ -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
@@ -0,0 +1,5 @@
1
+ ### Changes
2
+
3
+ * [#126](https://github.com/rubocop/rubocop-minitest/issues/126): Mark `Minitest/AssertWithExpectedArgument` as unsafe. ([@koic][])
4
+
5
+ [@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-hq/rubocop-minitest/pull/11): Add new `Minitest/RefuteNil` cop. ([@tejasbubane ][])
4
- * [#8](https://github.com/rubocop-hq/rubocop-minitest/pull/8): Add new `Minitest/AssertTruthy` cop. ([@abhaynikam ][])
5
- * [#9](https://github.com/rubocop-hq/rubocop-minitest/pull/9): Add new `Minitest/AssertIncludes` cop. ([@abhaynikam ][])
6
- * [#10](https://github.com/rubocop-hq/rubocop-minitest/pull/10): Add new `Minitest/AssertEmpty` cop. ([@abhaynikam ][])
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-hq/rubocop-minitest/issues/13): Fix the execution target specified in `Include` parameter. ([@koic][])
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-hq/rubocop-minitest/pull/15): Add new `Minitest/RefuteIncludes` cop. ([@abhaynikam][])
6
- * [#18](https://github.com/rubocop-hq/rubocop-minitest/pull/18): Add new `Minitest/RefuteFalse` cop. ([@duduribeiro][])
7
- * [#20](https://github.com/rubocop-hq/rubocop-minitest/pull/20): Add new `Minitest/RefuteEmpty` cop. ([@abhaynikam][])
8
- * [#21](https://github.com/rubocop-hq/rubocop-minitest/pull/21): Add new `Minitest/RefuteEqual` cop. ([@duduribeiro][])
9
- * [#27](https://github.com/rubocop-hq/rubocop-minitest/pull/27): Add new `Minitest/AssertRespondTo` cop. ([@duduribeiro][])
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-hq/rubocop-minitest/pull/19): Fix a false negative for `Minitest/AssertIncludes` when using `include` method in arguments of `assert` method. ([@abhaynikam][])
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-hq/rubocop-minitest/pull/29): Add new `Minitest/RefuteRespondTo` cop. ([@herwinw][])
4
- * [#31](https://github.com/rubocop-hq/rubocop-minitest/pull/31): Add new `Minitest/AssertEqual` cop. ([@herwinw][])
5
- * [#34](https://github.com/rubocop-hq/rubocop-minitest/pull/34): Add new `Minitest/AssertInstanceOf` cop. ([@abhaynikam][])
6
- * [#35](https://github.com/rubocop-hq/rubocop-minitest/pull/35): Add new `Minitest/RefuteInstanceOf` cop. ([@abhaynikam][])
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-hq/rubocop-minitest/issues/25): Add `Enabled: true` to `Minitest` department config to suppress `Warning: Minitest does not support Enabled parameter`. ([@koic][])
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-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][])
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-hq/rubocop-minitest/issues/32): Add new `Minitest/AssertEmptyLiteral` cop. ([@tejasbubane][])
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-hq/rubocop-minitest/issues/42): Fix an incorrect autocorrect for some cops of `Minitest` department when using heredoc message. ([@koic][])
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-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][])
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-hq/rubocop-minitest/issues/52): Make `Minitest/RefuteFalse` cop aware of `assert(!test)`. ([@koic][])
4
- * [#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][])
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-hq/rubocop-minitest/issues/55): Fix an error for `Minitest/AssertIncludes` when using local variable argument. ([@koic][])
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-hq/rubocop-minitest/issues/60): Add new cop `Minitest/GlobalExpectations` to check for deprecated global expectations. ([@tejasbubane][])
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-hq/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-hq/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-hq/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-hq/rubocop-minitest/pull/62): Fix a false negative for `Minitest/AssertEmpty` and `Minitest/RefuteEmpty` when an argument is enclosed in redundant parentheses. ([@koic][])
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-hq/rubocop-minitest/issues/66): Support all expectations of `Minitest::Expectations` for `Minitest/GlobalExpectations` cop. ([@koic][])
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-hq/rubocop-minitest/issues/60): Fix `Minitest/GlobalExpectations` autocorrection for chained methods. ([@tejasbubane][])
8
- * [#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][])
9
- * [#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][])
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-hq/rubocop-minitest/pull/72): Fix some false negatives for `Minitest/GlobalExpectations`. ([@andrykonchin][])
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-hq/rubocop-minitest/issues/75): Fix a false negative for `Minitest/GlobalExpectations` when using global expectation methods with no arguments. ([@koic][])
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-hq/rubocop-minitest/issues/73): The Minitest department works on file names end with `_test.rb` by default. ([@koic][])
8
- * [#77](https://github.com/rubocop-hq/rubocop-minitest/pull/77): **(BREAKING)** Drop support for Ruby 2.3. ([@koic][])
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
@@ -6,7 +6,7 @@ require 'rubocop/minitest/version'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'rubocop-minitest'
9
- spec.version = RuboCop::Minitest::VERSION
9
+ spec.version = RuboCop::Minitest::Version::STRING
10
10
  spec.authors = ['Bozhidar Batsov', 'Jonas Arvidsson', 'Koichi ITO']
11
11
 
12
12
  spec.summary = 'Automatic Minitest code style checking tool.'
@@ -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-hq/rubocop-minitest/blob/master/CHANGELOG.md',
23
- 'source_code_uri' => 'https://github.com/rubocop-hq/rubocop-minitest',
24
- 'documentation_uri' => 'https://docs.rubocop.org/rubocop-minitest/',
25
- 'bug_tracker_uri' => 'https://github.com/rubocop-hq/rubocop-minitest/issues'
22
+ 'changelog_uri' => 'https://github.com/rubocop/rubocop-minitest/blob/master/CHANGELOG.md',
23
+ 'source_code_uri' => 'https://github.com/rubocop/rubocop-minitest',
24
+ 'documentation_uri' => "https://docs.rubocop.org/rubocop-minitest/#{RuboCop::Minitest::Version.document_version}",
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.87'
37
+ spec.add_runtime_dependency 'rubocop', '>= 0.90', '< 2.0'
38
38
  spec.add_development_dependency 'minitest', '~> 5.11'
39
39
  end