Sha256: 0d598c01a4599465ced45b14701f1e85b9b51a3d0a19dbdb0a76d3a5bd5640b6
Contents?: true
Size: 606 Bytes
Versions: 12
Compression:
Stored size: 606 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert_match` # instead of using `assert(matcher.match(string))`. # # @example # # bad # assert(matcher.match(string)) # assert(matcher.match(string), 'message') # # # good # assert_match(regex, string) # assert_match(matcher, string, 'message') # class AssertMatch < Base extend MinitestCopRule define_rule :assert, target_method: :match, inverse: 'regexp_type?' end end end end
Version data entries
12 entries across 12 versions & 1 rubygems