Class Spec::Matchers::BeKindOf

  1. lib/spec/matchers/be_kind_of.rb
Parent: Object

Public class methods

new (expected)
[show source]
# File lib/spec/matchers/be_kind_of.rb, line 4
      def initialize(expected)
        @expected = expected
      end

Public instance methods

description ()
[show source]
# File lib/spec/matchers/be_kind_of.rb, line 13
      def description
        "be a kind of #{@expected}"
      end
failure_message_for_should ()
[show source]
# File lib/spec/matchers/be_kind_of.rb, line 17
      def failure_message_for_should
        "expected kind of #{@expected}, got #{@actual.inspect}"
      end
failure_message_for_should_not ()
[show source]
# File lib/spec/matchers/be_kind_of.rb, line 21
      def failure_message_for_should_not
        "expected #{@actual.inspect} not to be a kind of #{@expected}"
      end
matches? (actual)
[show source]
# File lib/spec/matchers/be_kind_of.rb, line 8
      def matches?(actual)
        @actual = actual
        @actual.kind_of?(@expected)
      end