Method: Spec::Example::Subject::ExampleMethods#should_not

Defined in:
lib/spec/example/subject.rb

#should_not(matcher = nil, message = nil) ⇒ Object

Just like should, should_not delegates to the subject (implicit or explicit) of the example group.

Examples

describe Person do
  it { should_not be_eligible_to_vote }
end


102
103
104
# File 'lib/spec/example/subject.rb', line 102

def should_not(matcher=nil, message=nil)
  self == subject ? self.__should_not_for_example_group__(matcher) : subject.should_not(matcher,message)
end