Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Minitest/GlobalExpectations aware of pattern matchers #244

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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