# File lib/mspec/matchers/be_kind_of.rb, line 2 def initialize(expected) @expected = expected end
# File lib/mspec/matchers/be_kind_of.rb, line 11 def failure_message ["Expected #{@actual.inspect} (#{@actual.class})", "to be kind of #{@expected}"] end
# File lib/mspec/matchers/be_kind_of.rb, line 6 def matches?(actual) @actual = actual @actual.is_a?(@expected) end
# File lib/mspec/matchers/be_kind_of.rb, line 15 def negative_failure_message ["Expected #{@actual.inspect} (#{@actual.class})", "not to be kind of #{@expected}"] end