Skip to content

Commit

Permalink
Cut 0.34.5
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Jan 20, 2024
1 parent 3cac9e3 commit d097efa
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

## master (unreleased)

## 0.34.5 (2024-01-20)

### Bug fixes

* [#299](https://github.com/rubocop/rubocop-minitest/pull/299): Fix an error for `Style/UselessAssertion` when passing a single argument to methods to accept two arguments. ([@earlopain][])
Expand Down
4 changes: 2 additions & 2 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Minitest/AssertKindOf:
StyleGuide: 'https://github.com/rubocop/minitest-style-guide#assert-kind-of'
Enabled: 'pending'
VersionAdded: '0.10'
VersionChanged: '<<next>>'
VersionChanged: '0.34'

Minitest/AssertMatch:
Description: 'This cop enforces the test to use `assert_match` instead of using `assert(matcher.match(object))`.'
Expand Down Expand Up @@ -253,7 +253,7 @@ Minitest/RefuteKindOf:
StyleGuide: 'https://github.com/rubocop/minitest-style-guide#refute-kind-of'
Enabled: 'pending'
VersionAdded: '0.10'
VersionChanged: '<<next>>'
VersionChanged: '0.34'

Minitest/RefuteMatch:
Description: 'This cop enforces the test to use `refute_match` instead of using `refute(matcher.match(object))`.'
Expand Down
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name: rubocop-minitest
title: RuboCop Minitest
# We always provide version without patch here (e.g. 1.1),
# as patch versions should not appear in the docs.
version: ~
version: '0.34'
nav:
- modules/ROOT/nav.adoc
14 changes: 12 additions & 2 deletions docs/modules/ROOT/pages/cops_minitest.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ assert_instance_of(Class, object, 'message')
| Yes
| Yes
| 0.10
| -
| 0.34
|===
Enforces the test to use `assert_kind_of(Class, object)`
Expand All @@ -218,6 +218,11 @@ over `assert(object.kind_of?(Class))`.
assert(object.kind_of?(Class))
assert(object.kind_of?(Class), 'message')
# bad
# `is_a?` is an alias for `kind_of?`
assert(object.is_a?(Class))
assert(object.is_a?(Class), 'message')
# good
assert_kind_of(Class, object)
assert_kind_of(Class, object, 'message')
Expand Down Expand Up @@ -1509,7 +1514,7 @@ refute_instance_of(Class, object, 'message')
| Yes
| Yes
| 0.10
| -
| 0.34
|===
Enforces the use of `refute_kind_of(Class, object)`
Expand All @@ -1523,6 +1528,11 @@ over `refute(object.kind_of?(Class))`.
refute(object.kind_of?(Class))
refute(object.kind_of?(Class), 'message')
# bad
# `is_a?` is an alias for `kind_of?`
refute(object.is_of?(Class))
refute(object.is_of?(Class), 'message')
# good
refute_kind_of(Class, object)
refute_kind_of(Class, object, 'message')
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/minitest/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module RuboCop
module Minitest
# This module holds the RuboCop Minitest version information.
module Version
STRING = '0.34.4'
STRING = '0.34.5'

def self.document_version
STRING.match('\d+\.\d+').to_s
Expand Down
10 changes: 10 additions & 0 deletions relnotes/v0.34.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### Bug fixes

* [#299](https://github.com/rubocop/rubocop-minitest/pull/299): Fix an error for `Style/UselessAssertion` when passing a single argument to methods to accept two arguments. ([@earlopain][])

### Changes

* [#298](https://github.com/rubocop/rubocop-minitest/pull/298): Extend `Minitest/AssertKindOf` to also correct `assert(object.is_a?(Class))`. ([@amomchilov][])

[@earlopain]: https://github.com/earlopain
[@amomchilov]: https://github.com/amomchilov

0 comments on commit d097efa

Please sign in to comment.