Sha256: 24d4f7c4e5612eb3f538d7b9170df3cb45e258b5db2b988b08f99a8a22a72814
Contents?: true
Size: 618 Bytes
Versions: 6
Compression:
Stored size: 618 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 < Cop extend MinitestCopRule define_rule :assert, target_method: :kind_of?, inverse: true end end end end
Version data entries
6 entries across 6 versions & 1 rubygems