Skip to content

Commit

Permalink
Make Minitest/GlobalExpectations aware of pattern matchers
Browse files Browse the repository at this point in the history
Follow up minitest/minitest@0c44f4e

This PR makes `Minitest/GlobalExpectations` aware of
`must_pattern_match` and `wont_pattern_match` matchers.
  • Loading branch information
koic committed Mar 11, 2023
1 parent c460a81 commit 5d6590f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#243](https://github.com/rubocop/rubocop-minitest/pull/243): Make `Minitest/GlobalExpectations` aware of `must_pattern_match` and `wont_pattern_match` matchers. ([@koic][])
4 changes: 3 additions & 1 deletion lib/rubocop/cop/minitest/global_expectations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ class GlobalExpectations < Base
wont_be_kind_of wont_match wont_be_nil wont_be wont_respond_to wont_be_same_as
].freeze

BLOCK_MATCHERS = %i[must_output must_raise must_be_silent must_throw].freeze
BLOCK_MATCHERS = %i[
must_output must_pattern_match must_raise must_be_silent must_throw wont_pattern_match
].freeze

RESTRICT_ON_SEND = VALUE_MATCHERS + BLOCK_MATCHERS

Expand Down

0 comments on commit 5d6590f

Please sign in to comment.