class RSpec::Matchers::BuiltIn::BeAnInstanceOf
Not intended to be instantiated directly.
Provides the implementation for ‘be_an_instance_of`.
@api private
def description
-
(String)
-
Other tags:
- Api: - private
def description "be an instance of #{expected}" end
def match(expected, actual)
def match(expected, actual) actual.instance_of?(expected) rescue NoMethodError raise ::ArgumentError, "The #{matcher_name} matcher requires that " \ "the actual object responds to #instance_of? method " \ "but a `NoMethodError` was encountered instead." end