Sha256: 36ac748fd7f802a9976e574ad539a4671bce5d867542c20e677afbf56b9d3801
Contents?: true
Size: 610 Bytes
Versions: 30
Compression:
Stored size: 610 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert_kind_of(Class, object)` # over `assert(object.kind_of?(Class))`. # # @example # # bad # assert(object.kind_of?(Class)) # assert(object.kind_of?(Class), 'message') # # # good # assert_kind_of(Class, object) # assert_kind_of(Class, object, 'message') # class AssertKindOf < Base extend MinitestCopRule define_rule :assert, target_method: :kind_of?, inverse: true end end end end
Version data entries
30 entries across 30 versions & 1 rubygems