Class: OSpec::BeNilMatcher

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



39
40
41
42
43
# File 'lib/ospec/matchers.rb', line 39

def match expected
  unless expected.nil?
    failure "expected #{expected.inspect} to be nil."
  end
end