module RSpec::Mocks::ArgumentMatchers

def kind_of(klass)

object.should_receive(:message).with(kind_of(Thing))

@example
Matches if `arg.kind_of?(klass)`
def kind_of(klass)
  KindOf.new(klass)
end