Sha256: 07bb1ab28049fdeba19c696c3d9d71915038defef221a6e423ef5f4688a77a64
Contents?: true
Size: 619 Bytes
Versions: 14
Compression:
Stored size: 619 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Minitest # This cop 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
14 entries across 14 versions & 1 rubygems