Sha256: df28873718391e36a4ca306c7716d1ed4be613ca602853999c29945612a354ac
Contents?: true
Size: 642 Bytes
Versions: 18
Compression:
Stored size: 642 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Minitest # 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 < Base extend MinitestCopRule define_rule :assert, target_method: :instance_of?, inverse: true end end end end
Version data entries
18 entries across 18 versions & 1 rubygems