Sha256: 0d7401ecc6986a20eb4a35ee6172f3ccb7c0be7a2d799fdc65a479ff0b55fb2c
Contents?: true
Size: 650 Bytes
Versions: 10
Compression:
Stored size: 650 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Minitest # This cop enforces the test to use `assert_instance_of(Class, object)` # over `assert(object.instance_of?(Class))`. # # @example # # bad # assert(object.instance_of?(Class)) # assert(object.instance_of?(Class), 'message') # # # good # assert_instance_of(Class, object) # assert_instance_of(Class, object, 'message') # class AssertInstanceOf < Cop extend MinitestCopRule define_rule :assert, target_method: :instance_of?, inverse: true end end end end
Version data entries
10 entries across 10 versions & 1 rubygems