Method: Spec::Expectations::ObjectExpectations#should_not
- Defined in:
- lib/spec/expectations/extensions/object.rb
#should_not(matcher = nil, &block) ⇒ Object
:call-seq:
should_not(matcher)
should_not == expected
should_not === expected
should_not =~ expected
receiver.should_not(matcher)
=> Passes unless matcher.matches?(receiver)
receiver.should_not == expected
=> Passes unless (receiver == expected)
receiver.should_not === expected
=> Passes unless (receiver === expected)
receiver.should_not =~ regexp
=> Passes unless (receiver =~ regexp)
See Spec::Matchers for more information about matchers
53 54 55 |
# File 'lib/spec/expectations/extensions/object.rb', line 53 def should_not(matcher=nil, &block) NegativeExpectationMatcherHandler.handle_matcher(self, matcher, &block) end |