Skip to content

Commit

Permalink
Merge pull request #244 from koic/make_minitest_global_expectations_a…
Browse files Browse the repository at this point in the history
…ware_of_pattern_matchers

Make `Minitest/GlobalExpectations` aware of pattern matchers
  • Loading branch information
koic committed Mar 19, 2023
2 parents 90cc740 + 5c18a78 commit b6c7635
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 @@
* [#244](https://github.com/rubocop/rubocop-minitest/pull/244): 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 b6c7635

Please sign in to comment.