Class: RuboCop::Cop::Minitest::AssertInstanceOf
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Minitest::AssertInstanceOf
- Extended by:
- AutoCorrector
- Includes:
- InstanceOfAssertionHandleable
- Defined in:
- lib/rubocop/cop/minitest/assert_instance_of.rb
Overview
Enforces the test to use ‘assert_instance_of(Class, object)` over `assert(object.instance_of?(Class))`.
Constant Summary collapse
- RESTRICT_ON_SEND =
%i[assert assert_equal].freeze
Constants included from InstanceOfAssertionHandleable
InstanceOfAssertionHandleable::MSG
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
35 36 37 |
# File 'lib/rubocop/cop/minitest/assert_instance_of.rb', line 35 def on_send(node) investigate(node, :assert) end |