Class: OSpec::BeKindOfMatcher

Inherits:
Matcher show all
Defined in:
lib/ospec/matchers.rb

Instance Method Summary collapse

Methods inherited from Matcher

#failure, #initialize

Constructor Details

This class inherits a constructor from OSpec::Matcher

Instance Method Details

#match(expected) ⇒ Object



31
32
33
34
35
# File 'lib/ospec/matchers.rb', line 31

def match expected
  unless expected.kind_of? @actual
    failure "expected #{expected.inspect} to be a kind of #{@actual}, not #{expected.class}."
  end
end