Sha256: a6f7fe31fdd5fc0d7040fc162a56b009c3dc46b39fd19724a2f1e3db28ea34f3
Contents?: true
Size: 760 Bytes
Versions: 8
Compression:
Stored size: 760 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `refute_match` # instead of using `refute(matcher.match(string))`. # # @example # # bad # refute(matcher.match(string)) # refute(matcher.match?(string)) # refute(matcher =~ string) # refute(matcher.match(string), 'message') # # # good # refute_match(matcher, string) # refute_match(matcher, string, 'message') # class RefuteMatch < Base extend MinitestCopRule define_rule :refute, target_method: %i[match match? =~], preferred_method: :refute_match, inverse: 'regexp_type?' end end end end
Version data entries
8 entries across 8 versions & 1 rubygems