Sha256: 0d00b1d7804fa1907d4f1e68e1bb183d5936d7b7eae1c53f7a11153fabbd3b7c
Contents?: true
Size: 613 Bytes
Versions: 6
Compression:
Stored size: 613 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Minitest # This cop enforces the use of `refute_kind_of(Class, object)` # over `refute(object.kind_of?(Class))`. # # @example # # bad # refute(object.kind_of?(Class)) # refute(object.kind_of?(Class), 'message') # # # good # refute_kind_of(Class, object) # refute_kind_of(Class, object, 'message') # class RefuteKindOf < Cop extend MinitestCopRule define_rule :refute, target_method: :kind_of?, inverse: true end end end end
Version data entries
6 entries across 6 versions & 1 rubygems