rubocop-minitest 0.20.0 → 0.21.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c35365ef5838d4a75f01181865e860ecb774a73288a310ffe2bfec21b6c6001
4
- data.tar.gz: ccbdb0bb831bcebec0cde35263bf90063e400a25d97bccb9facf3edbc0bbd23a
3
+ metadata.gz: 32fe1532cdbac42cfc34dd6be3ce6c06af43c58b0fdac50d4d0afafb92006db8
4
+ data.tar.gz: bfdd3899218529e728b777b77092103c1bf9db73523835666988d953a6b47f3d
5
5
  SHA512:
6
- metadata.gz: 0a85bb1c4f0226eb025cdf18ae72757403ea71b422b19291e80bf696c95735cb2ddd3f61f921ad01c04c88ef731aa3e39d68141ac8971315e5933575cab6ec8c
7
- data.tar.gz: b449004eb3a26c8996490d5e5008e784f10660edba75e99a7b3d5ef317d6c4585757aee59e7c95fb7100d892a2769c88bf26f42ac96684488945a5e9ee775155
6
+ metadata.gz: a6c4de4a42725e76f84de44313534b07a958f7c84ac5a63b8c7948b1edb9eadc27e81734721f7adda6b6b0b2d4a9e9ee8a90f9fa401fde7bd2faf799b229dded
7
+ data.tar.gz: 01d06e6462b2fc9f4dbdc133392d4b266a2df33ebac5ebbe042dd6d3185062bfd4df1017b4a3e255e12b56152284f2d2484668e650262907c9de3a3bccaee299
data/.rubocop.yml CHANGED
@@ -31,6 +31,12 @@ Naming/InclusiveLanguage:
31
31
  Enabled: true
32
32
  CheckStrings: true
33
33
  FlaggedTerms:
34
+ auto-correct:
35
+ Suggestions:
36
+ - autocorrect
37
+ auto_correct:
38
+ Suggestions:
39
+ - autocorrect
34
40
  behaviour:
35
41
  Suggestions:
36
42
  - behavior
@@ -68,6 +74,9 @@ Layout/ClassStructure:
68
74
  - protected_methods
69
75
  - private_methods
70
76
 
77
+ Layout/RedundantLineBreak:
78
+ Enabled: true
79
+
71
80
  # Trailing white space is meaningful in code examples
72
81
  Layout/TrailingWhitespace:
73
82
  AllowInHeredoc: true
data/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.21.1 (2022-08-28)
6
+
7
+ ### Bug fixes
8
+
9
+ * [#178](https://github.com/rubocop/rubocop-minitest/pull/178): Fix incorrect documentation URLs when using `rubocop --show-docs-url`. ([@r7kamura][])
10
+
11
+ ## 0.21.0 (2022-07-31)
12
+
13
+ ### New features
14
+
15
+ * [#109](https://github.com/rubocop/rubocop-minitest/issues/109): Add new `Minitest/AssertRaisesCompoundBody` cop. ([@fatkodima][])
16
+
17
+ ## 0.20.1 (2022-06-13)
18
+
19
+ ### Bug fixes
20
+
21
+ * [#175](https://github.com/rubocop/rubocop-minitest/pull/175): Fix raise error when using assert with block. ([@ippachi][])
22
+
5
23
  ## 0.20.0 (2022-05-29)
6
24
 
7
25
  ### New features
@@ -314,3 +332,5 @@
314
332
  [@gi]: https://github.com/gi
315
333
  [@ignacio-chiazzo]: https://github.com/ignacio-chiazzo
316
334
  [@gjtorikian]: https://github.com/gjtorikian
335
+ [@ippachi]: https://github.com/ippachi
336
+ [@r7kamura]: https://github.com/r7kamura
data/Rakefile CHANGED
@@ -28,18 +28,14 @@ end
28
28
  desc 'Run RuboCop over itself'
29
29
  RuboCop::RakeTask.new(:internal_investigation)
30
30
 
31
- task default: %i[
32
- documentation_syntax_check
33
- test
34
- internal_investigation
35
- ]
31
+ task default: %i[documentation_syntax_check test internal_investigation]
36
32
 
37
33
  desc 'Generate a new cop template'
38
34
  task :new_cop, [:cop] do |_task, args|
39
35
  require 'rubocop'
40
36
 
41
37
  cop_name = args.fetch(:cop) do
42
- warn 'usage: bundle exec rake new_cop[Department/Name]'
38
+ warn "usage: bundle exec rake 'new_cop[Department/Name]'"
43
39
  exit!
44
40
  end
45
41
 
data/config/default.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  Minitest:
2
2
  Enabled: true
3
+ DocumentationBaseURL: https://docs.rubocop.org/rubocop-minitest
3
4
  Include:
4
5
  - '**/test/**/*'
5
6
  - '**/*_test.rb'
@@ -76,6 +77,11 @@ Minitest/AssertPredicate:
76
77
  Enabled: pending
77
78
  VersionAdded: '0.18'
78
79
 
80
+ Minitest/AssertRaisesCompoundBody:
81
+ Description: 'This cop enforces the block body of `assert_raises { ... }` to be reduced to only the raising code.'
82
+ Enabled: pending
83
+ VersionAdded: '0.21'
84
+
79
85
  Minitest/AssertRespondTo:
80
86
  Description: 'This cop enforces the test to use `assert_respond_to(object, :do_something)` over `assert(object.respond_to?(:do_something))`.'
81
87
  StyleGuide: 'https://minitest.rubystyle.guide#assert-responds-to-method'
data/docs/antora.yml CHANGED
@@ -2,6 +2,6 @@ name: rubocop-minitest
2
2
  title: RuboCop Minitest
3
3
  # We always provide version without patch here (e.g. 1.1),
4
4
  # as patch versions should not appear in the docs.
5
- version: '0.20'
5
+ version: '0.21'
6
6
  nav:
7
7
  - modules/ROOT/nav.adoc
@@ -25,6 +25,7 @@ based on the https://minitest.rubystyle.guide/[Minitest Style Guide].
25
25
  * xref:cops_minitest.adoc#minitestassertoutput[Minitest/AssertOutput]
26
26
  * xref:cops_minitest.adoc#minitestassertpathexists[Minitest/AssertPathExists]
27
27
  * xref:cops_minitest.adoc#minitestassertpredicate[Minitest/AssertPredicate]
28
+ * xref:cops_minitest.adoc#minitestassertraisescompoundbody[Minitest/AssertRaisesCompoundBody]
28
29
  * xref:cops_minitest.adoc#minitestassertrespondto[Minitest/AssertRespondTo]
29
30
  * xref:cops_minitest.adoc#minitestassertsilent[Minitest/AssertSilent]
30
31
  * xref:cops_minitest.adoc#minitestasserttruthy[Minitest/AssertTruthy]
@@ -379,6 +379,44 @@ assert_predicate(obj, :one?, 'message')
379
379
 
380
380
  * https://minitest.rubystyle.guide/#assert-predicate
381
381
 
382
+ == Minitest/AssertRaisesCompoundBody
383
+
384
+ |===
385
+ | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed
386
+
387
+ | Pending
388
+ | Yes
389
+ | No
390
+ | 0.21
391
+ | -
392
+ |===
393
+
394
+ Enforces the block body of `assert_raises { ... }` to be reduced to only the raising code.
395
+
396
+ === Examples
397
+
398
+ [source,ruby]
399
+ ----
400
+ # bad
401
+ assert_raises(MyError) do
402
+ foo
403
+ bar
404
+ end
405
+
406
+ # good
407
+ assert_raises(MyError) do
408
+ foo
409
+ end
410
+
411
+ # good
412
+ assert_raises(MyError) do
413
+ foo do
414
+ bar
415
+ baz
416
+ end
417
+ end
418
+ ----
419
+
382
420
  == Minitest/AssertRespondTo
383
421
 
384
422
  |===
@@ -619,7 +657,7 @@ and autocorrects them to use expect format.
619
657
 
620
658
  === Examples
621
659
 
622
- ==== EnforcedStyle: _
660
+ ==== EnforcedStyle: any (default)
623
661
 
624
662
  [source,ruby]
625
663
  ----
@@ -628,6 +666,11 @@ musts.must_equal expected_musts
628
666
  wonts.wont_match expected_wonts
629
667
  musts.must_raise TypeError
630
668
 
669
+ # good
670
+ _(musts).must_equal expected_musts
671
+ _(wonts).wont_match expected_wonts
672
+ _ { musts }.must_raise TypeError
673
+
631
674
  expect(musts).must_equal expected_musts
632
675
  expect(wonts).wont_match expected_wonts
633
676
  expect { musts }.must_raise TypeError
@@ -635,14 +678,9 @@ expect { musts }.must_raise TypeError
635
678
  value(musts).must_equal expected_musts
636
679
  value(wonts).wont_match expected_wonts
637
680
  value { musts }.must_raise TypeError
638
-
639
- # good
640
- _(musts).must_equal expected_musts
641
- _(wonts).wont_match expected_wonts
642
- _ { musts }.must_raise TypeError
643
681
  ----
644
682
 
645
- ==== EnforcedStyle: any (default)
683
+ ==== EnforcedStyle: _
646
684
 
647
685
  [source,ruby]
648
686
  ----
@@ -651,11 +689,6 @@ musts.must_equal expected_musts
651
689
  wonts.wont_match expected_wonts
652
690
  musts.must_raise TypeError
653
691
 
654
- # good
655
- _(musts).must_equal expected_musts
656
- _(wonts).wont_match expected_wonts
657
- _ { musts }.must_raise TypeError
658
-
659
692
  expect(musts).must_equal expected_musts
660
693
  expect(wonts).wont_match expected_wonts
661
694
  expect { musts }.must_raise TypeError
@@ -663,6 +696,11 @@ expect { musts }.must_raise TypeError
663
696
  value(musts).must_equal expected_musts
664
697
  value(wonts).wont_match expected_wonts
665
698
  value { musts }.must_raise TypeError
699
+
700
+ # good
701
+ _(musts).must_equal expected_musts
702
+ _(wonts).wont_match expected_wonts
703
+ _ { musts }.must_raise TypeError
666
704
  ----
667
705
 
668
706
  ==== EnforcedStyle: expect
@@ -39,13 +39,7 @@ module RuboCop
39
39
  private
40
40
 
41
41
  def test_path
42
- File.join(
43
- 'test',
44
- 'rubocop',
45
- 'cop',
46
- 'minitest',
47
- "#{snake_case(badge.cop_name.to_s)}_test.rb"
48
- )
42
+ File.join('test', 'rubocop', 'cop', 'minitest', "#{snake_case(badge.cop_name.to_s)}_test.rb")
49
43
  end
50
44
 
51
45
  def generated_test
@@ -19,7 +19,7 @@ module RuboCop
19
19
  include InDeltaMixin
20
20
  extend AutoCorrector
21
21
 
22
- RESTRICT_ON_SEND = %i[assert_equal].freeze
22
+ RESTRICT_ON_SEND = %i[assert_equal].freeze # rubocop:disable InternalAffairs/UselessRestrictOnSend
23
23
 
24
24
  def_node_matcher :equal_floats_call, <<~PATTERN
25
25
  (send nil? :assert_equal $_ $_ $...)
@@ -21,7 +21,7 @@ module RuboCop
21
21
  extend AutoCorrector
22
22
 
23
23
  MSG = 'Prefer using `assert_predicate(%<new_arguments>s)`.'
24
- RESTRICT_ON_SEND = %i[assert].freeze
24
+ RESTRICT_ON_SEND = %i[assert].freeze # rubocop:disable InternalAffairs/UselessRestrictOnSend
25
25
 
26
26
  private
27
27
 
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Minitest
6
+ # Enforces the block body of `assert_raises { ... }` to be reduced to only the raising code.
7
+ #
8
+ # @example
9
+ # # bad
10
+ # assert_raises(MyError) do
11
+ # foo
12
+ # bar
13
+ # end
14
+ #
15
+ # # good
16
+ # assert_raises(MyError) do
17
+ # foo
18
+ # end
19
+ #
20
+ # # good
21
+ # assert_raises(MyError) do
22
+ # foo do
23
+ # bar
24
+ # baz
25
+ # end
26
+ # end
27
+ #
28
+ class AssertRaisesCompoundBody < Base
29
+ MSG = 'Reduce `assert_raises` block body to contain only the raising code.'
30
+
31
+ def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
32
+ return unless node.method?(:assert_raises) && multi_statement_begin?(node.body)
33
+
34
+ add_offense(node)
35
+ end
36
+
37
+ private
38
+
39
+ def multi_statement_begin?(node)
40
+ node.begin_type? && node.children.size > 1
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -26,7 +26,7 @@ module RuboCop
26
26
  ...)
27
27
  PATTERN
28
28
 
29
- def on_block(node)
29
+ def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
30
30
  return unless assert_silent_candidate?(node)
31
31
 
32
32
  send_node = node.send_node
@@ -6,12 +6,17 @@ module RuboCop
6
6
  # Checks for deprecated global expectations
7
7
  # and autocorrects them to use expect format.
8
8
  #
9
- # @example EnforcedStyle: _
9
+ # @example EnforcedStyle: any (default)
10
10
  # # bad
11
11
  # musts.must_equal expected_musts
12
12
  # wonts.wont_match expected_wonts
13
13
  # musts.must_raise TypeError
14
14
  #
15
+ # # good
16
+ # _(musts).must_equal expected_musts
17
+ # _(wonts).wont_match expected_wonts
18
+ # _ { musts }.must_raise TypeError
19
+ #
15
20
  # expect(musts).must_equal expected_musts
16
21
  # expect(wonts).wont_match expected_wonts
17
22
  # expect { musts }.must_raise TypeError
@@ -20,22 +25,12 @@ module RuboCop
20
25
  # value(wonts).wont_match expected_wonts
21
26
  # value { musts }.must_raise TypeError
22
27
  #
23
- # # good
24
- # _(musts).must_equal expected_musts
25
- # _(wonts).wont_match expected_wonts
26
- # _ { musts }.must_raise TypeError
27
- #
28
- # @example EnforcedStyle: any (default)
28
+ # @example EnforcedStyle: _
29
29
  # # bad
30
30
  # musts.must_equal expected_musts
31
31
  # wonts.wont_match expected_wonts
32
32
  # musts.must_raise TypeError
33
33
  #
34
- # # good
35
- # _(musts).must_equal expected_musts
36
- # _(wonts).wont_match expected_wonts
37
- # _ { musts }.must_raise TypeError
38
- #
39
34
  # expect(musts).must_equal expected_musts
40
35
  # expect(wonts).wont_match expected_wonts
41
36
  # expect { musts }.must_raise TypeError
@@ -44,6 +39,11 @@ module RuboCop
44
39
  # value(wonts).wont_match expected_wonts
45
40
  # value { musts }.must_raise TypeError
46
41
  #
42
+ # # good
43
+ # _(musts).must_equal expected_musts
44
+ # _(wonts).wont_match expected_wonts
45
+ # _ { musts }.must_raise TypeError
46
+ #
47
47
  # @example EnforcedStyle: expect
48
48
  # # bad
49
49
  # musts.must_equal expected_musts
@@ -44,8 +44,7 @@ module RuboCop
44
44
  private
45
45
 
46
46
  def preferred_usage(first_arg, second_arg, custom_message = nil)
47
- [first_arg, second_arg, custom_message]
48
- .compact.map(&:source).join(', ')
47
+ [first_arg, second_arg, custom_message].compact.map(&:source).join(', ')
49
48
  end
50
49
 
51
50
  def original_usage(first_part, custom_message)
@@ -19,7 +19,7 @@ module RuboCop
19
19
  include InDeltaMixin
20
20
  extend AutoCorrector
21
21
 
22
- RESTRICT_ON_SEND = %i[refute_equal].freeze
22
+ RESTRICT_ON_SEND = %i[refute_equal].freeze # rubocop:disable InternalAffairs/UselessRestrictOnSend
23
23
 
24
24
  def_node_matcher :equal_floats_call, <<~PATTERN
25
25
  (send nil? :refute_equal $_ $_ $...)
@@ -21,7 +21,7 @@ module RuboCop
21
21
  extend AutoCorrector
22
22
 
23
23
  MSG = 'Prefer using `refute_predicate(%<new_arguments>s)`.'
24
- RESTRICT_ON_SEND = %i[refute].freeze
24
+ RESTRICT_ON_SEND = %i[refute].freeze # rubocop:disable InternalAffairs/UselessRestrictOnSend
25
25
 
26
26
  private
27
27
 
@@ -25,7 +25,7 @@ module RuboCop
25
25
 
26
26
  MSG = 'Unreachable `%<assertion_method>s` detected.'
27
27
 
28
- def on_block(node)
28
+ def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
29
29
  return unless node.method?(:assert_raises) && (body = node.body)
30
30
 
31
31
  last_node = body.begin_type? ? body.children.last : body
@@ -11,6 +11,7 @@ require_relative 'minitest/assert_empty_literal'
11
11
  require_relative 'minitest/assert_equal'
12
12
  require_relative 'minitest/assert_in_delta'
13
13
  require_relative 'minitest/assert_predicate'
14
+ require_relative 'minitest/assert_raises_compound_body'
14
15
  require_relative 'minitest/assert_with_expected_argument'
15
16
  require_relative 'minitest/assertion_in_lifecycle_hook'
16
17
  require_relative 'minitest/assert_kind_of'
@@ -11,30 +11,21 @@ module RuboCop
11
11
  def first_argument_range(node)
12
12
  first_argument = node.first_argument
13
13
 
14
- range_between(
15
- first_argument.source_range.begin_pos,
16
- first_argument.source_range.end_pos
17
- )
14
+ range_between(first_argument.source_range.begin_pos, first_argument.source_range.end_pos)
18
15
  end
19
16
 
20
17
  def first_and_second_arguments_range(node)
21
18
  first_argument = node.first_argument
22
19
  second_argument = node.arguments[1]
23
20
 
24
- range_between(
25
- first_argument.source_range.begin_pos,
26
- second_argument.source_range.end_pos
27
- )
21
+ range_between(first_argument.source_range.begin_pos, second_argument.source_range.end_pos)
28
22
  end
29
23
 
30
24
  def all_arguments_range(node)
31
25
  first_argument = node.first_argument
32
26
  last_argument = node.arguments.last
33
27
 
34
- range_between(
35
- first_argument.source_range.begin_pos,
36
- last_argument.source_range.end_pos
37
- )
28
+ range_between(first_argument.source_range.begin_pos, last_argument.source_range.end_pos)
38
29
  end
39
30
  end
40
31
  end
@@ -6,15 +6,15 @@ module RuboCop
6
6
  # Common functionality for `Minitest/AssertPredicate` and `Minitest/RefutePredicate` cops.
7
7
  module PredicateAssertionHandleable
8
8
  MSG = 'Prefer using `%<assertion_type>s_predicate(%<new_arguments>s)`.'
9
- RESTRICT_ON_SEND = %i[assert].freeze
10
9
 
11
10
  def on_send(node)
12
11
  return unless (arguments = peel_redundant_parentheses_from(node.arguments))
13
12
 
14
13
  first_argument = arguments.first
15
14
 
15
+ return unless first_argument
16
16
  return if first_argument.block_type? || first_argument.numblock_type?
17
- return unless first_argument.respond_to?(:predicate_method?) && first_argument.predicate_method?
17
+ return unless predicate_method?(first_argument)
18
18
  return unless first_argument.arguments.count.zero?
19
19
 
20
20
  add_offense(node, message: offense_message(arguments)) do |corrector|
@@ -38,13 +38,14 @@ module RuboCop
38
38
  peel_redundant_parentheses_from(arguments.first.children)
39
39
  end
40
40
 
41
+ def predicate_method?(first_argument)
42
+ first_argument.respond_to?(:predicate_method?) && first_argument.predicate_method?
43
+ end
44
+
41
45
  def offense_message(arguments)
42
46
  message_argument = arguments.last if arguments.first != arguments.last
43
47
 
44
- new_arguments = [
45
- new_arguments(arguments),
46
- message_argument&.source
47
- ].flatten.compact.join(', ')
48
+ new_arguments = [new_arguments(arguments), message_argument&.source].flatten.compact.join(', ')
48
49
 
49
50
  format(MSG, assertion_type: assertion_type, new_arguments: new_arguments)
50
51
  end
@@ -27,7 +27,7 @@ module RuboCop
27
27
  # end
28
28
  # RUBY
29
29
  #
30
- # Auto-correction can be tested using `assert_correction` after
30
+ # Autocorrection can be tested using `assert_correction` after
31
31
  # `assert_offense`.
32
32
  #
33
33
  # @example `assert_offense` and `assert_correction`
@@ -4,7 +4,7 @@ module RuboCop
4
4
  module Minitest
5
5
  # This module holds the RuboCop Minitest version information.
6
6
  module Version
7
- STRING = '0.20.0'
7
+ STRING = '0.21.1'
8
8
 
9
9
  def self.document_version
10
10
  STRING.match('\d+\.\d+').to_s
@@ -0,0 +1,5 @@
1
+ ### Bug fixes
2
+
3
+ * [#175](https://github.com/rubocop/rubocop-minitest/pull/175): Fix raise error when using assert with block. ([@ippachi][])
4
+
5
+ [@ippachi]: https://github.com/ippachi
@@ -0,0 +1,5 @@
1
+ ### New features
2
+
3
+ * [#109](https://github.com/rubocop/rubocop-minitest/issues/109): Add new `Minitest/AssertRaisesCompoundBody` cop. ([@fatkodima][])
4
+
5
+ [@fatkodima]: https://github.com/fatkodima
@@ -0,0 +1,5 @@
1
+ ### Bug fixes
2
+
3
+ * [#178](https://github.com/rubocop/rubocop-minitest/pull/178): Fix incorrect documentation URLs when using `rubocop --show-docs-url`. ([@r7kamura][])
4
+
5
+ [@r7kamura]: https://github.com/r7kamura
data/tasks/changelog.rb CHANGED
@@ -30,7 +30,7 @@ class Changelog
30
30
  end
31
31
 
32
32
  def write
33
- Dir.mkdir(ENTRIES_PATH) unless Dir.exist?(ENTRIES_PATH)
33
+ FileUtils.mkdir_p(ENTRIES_PATH)
34
34
  File.write(path, content)
35
35
  path
36
36
  end
@@ -22,7 +22,7 @@ end
22
22
 
23
23
  desc 'Syntax check for the documentation comments'
24
24
  task documentation_syntax_check: :yard_for_generate_documentation do
25
- require 'parser/ruby30'
25
+ require 'parser/ruby31'
26
26
 
27
27
  ok = true
28
28
  YARD::Registry.load!
@@ -37,7 +37,7 @@ task documentation_syntax_check: :yard_for_generate_documentation do
37
37
  examples.to_a.each do |example|
38
38
  buffer = Parser::Source::Buffer.new('<code>', 1)
39
39
  buffer.source = example.text
40
- parser = Parser::Ruby30.new(RuboCop::AST::Builder.new)
40
+ parser = Parser::Ruby31.new(RuboCop::AST::Builder.new)
41
41
  parser.diagnostics.all_errors_are_fatal = true
42
42
  parser.parse(buffer)
43
43
  rescue Parser::SyntaxError => e
@@ -38,10 +38,7 @@ namespace :cut_release do
38
38
  antora_metadata = File.read('docs/antora.yml')
39
39
 
40
40
  File.open('docs/antora.yml', 'w') do |f|
41
- f << antora_metadata.sub(
42
- "version: 'master'",
43
- "version: '#{version_sans_patch(new_version)}'"
44
- )
41
+ f << antora_metadata.sub('version: ~', "version: '#{version_sans_patch(new_version)}'")
45
42
  end
46
43
  end
47
44
 
@@ -52,8 +49,7 @@ namespace :cut_release do
52
49
  # Replace `<<next>>` (and variations) with version being cut.
53
50
  def update_cop_versions(_old_version, new_version)
54
51
  update_file('config/default.yml') do |default|
55
- default.gsub(/['"]?<<\s*next\s*>>['"]?/i,
56
- "'#{version_sans_patch(new_version)}'")
52
+ default.gsub(/['"]?<<\s*next\s*>>['"]?/i, "'#{version_sans_patch(new_version)}'")
57
53
  end
58
54
  end
59
55
 
@@ -70,8 +66,7 @@ namespace :cut_release do
70
66
 
71
67
  def user_links(text)
72
68
  names = text.scan(/\[@(\S+)\]\[\]/).map(&:first).uniq
73
- names.map { |name| "[@#{name}]: https://github.com/#{name}" }
74
- .join("\n")
69
+ names.map { |name| "[@#{name}]: https://github.com/#{name}" }.join("\n")
75
70
  end
76
71
 
77
72
  def run(release_type)
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.20.0
4
+ version: 0.21.1
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: 2022-05-28 00:00:00.000000000 Z
13
+ date: 2022-08-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop
@@ -103,6 +103,7 @@ files:
103
103
  - lib/rubocop/cop/minitest/assert_output.rb
104
104
  - lib/rubocop/cop/minitest/assert_path_exists.rb
105
105
  - lib/rubocop/cop/minitest/assert_predicate.rb
106
+ - lib/rubocop/cop/minitest/assert_raises_compound_body.rb
106
107
  - lib/rubocop/cop/minitest/assert_respond_to.rb
107
108
  - lib/rubocop/cop/minitest/assert_silent.rb
108
109
  - lib/rubocop/cop/minitest/assert_truthy.rb
@@ -167,6 +168,9 @@ files:
167
168
  - relnotes/v0.2.0.md
168
169
  - relnotes/v0.2.1.md
169
170
  - relnotes/v0.20.0.md
171
+ - relnotes/v0.20.1.md
172
+ - relnotes/v0.21.0.md
173
+ - relnotes/v0.21.1.md
170
174
  - relnotes/v0.3.0.md
171
175
  - relnotes/v0.4.0.md
172
176
  - relnotes/v0.4.1.md
@@ -191,7 +195,7 @@ metadata:
191
195
  homepage_uri: https://docs.rubocop.org/rubocop-minitest/
192
196
  changelog_uri: https://github.com/rubocop/rubocop-minitest/blob/master/CHANGELOG.md
193
197
  source_code_uri: https://github.com/rubocop/rubocop-minitest
194
- documentation_uri: https://docs.rubocop.org/rubocop-minitest/0.20
198
+ documentation_uri: https://docs.rubocop.org/rubocop-minitest/0.21
195
199
  bug_tracker_uri: https://github.com/rubocop/rubocop-minitest/issues
196
200
  rubygems_mfa_required: 'true'
197
201
  post_install_message: