class RSpec::Matchers::BuiltIn::BeAKindOf

@api private Provides the implementation for `be_a_kind_of`. Not intended to be instantiated directly.

Private Instance Methods

match(expected, actual) click to toggle source
# File lib/rspec/matchers/built_in/be_kind_of.rb, line 10
def match(expected, actual)
  actual.kind_of?(expected)
rescue NoMethodError
  raise ::ArgumentError, "The #{matcher_name} matcher requires that " \
                         "the actual object responds to #kind_of? method " \
                         "but a `NoMethodError` was encountered instead."
end