Sha256: cc03c00aa420d313e5a5165ba69814c7a589f615b149b6d69068cf9e4bfaf487
Contents?: true
Size: 589 Bytes
Versions: 10
Compression:
Stored size: 589 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Minitest # This cop 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 < Cop extend MinitestCopRule define_rule :assert, target_method: :match end end end end
Version data entries
10 entries across 10 versions & 1 rubygems