Skip to content

Files

Latest commit

 

History

History
24 lines (16 loc) · 433 Bytes

Minitest-AssertMatch.md

File metadata and controls

24 lines (16 loc) · 433 Bytes

Pattern: Use of assert(matcher.match(string))

Issue: -

Description

Enforces the test to use assert_match instead of using assert(matcher.match(string)).

Examples

# bad
assert(matcher.match(string))
assert(matcher.match(string), 'message')

# good
assert_match(regex, string)
assert_match(matcher, string, 'message')

Further Reading