Sha256: d6e94bdce1999436c4fa21e2040427dd1132e99716bdbc12a8db08c5f6a1547f
Contents?: true
Size: 646 Bytes
Versions: 14
Compression:
Stored size: 646 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Minitest # This cop enforces the use of `refute_instance_of(Class, object)` # over `refute(object.instance_of?(Class))`. # # @example # # bad # refute(object.instance_of?(Class)) # refute(object.instance_of?(Class), 'message') # # # good # refute_instance_of(Class, object) # refute_instance_of(Class, object, 'message') # class RefuteInstanceOf < Base extend MinitestCopRule define_rule :refute, target_method: :instance_of?, inverse: true end end end end
Version data entries
14 entries across 14 versions & 1 rubygems