method
failure_message_for_should_not
1.3.0 -
Show latest stable
-
0 notes -
Class: Spec::Matchers::Have
- 1.1.4
- 1.1.12
- 1.2.0 (0)
- 1.2.8 (0)
- 1.3.0 (0)
- 1.3.1 (0)
- What's this?
failure_message_for_should_not()
public
Hide source
# File lib/spec/matchers/have.rb, line 45 def failure_message_for_should_not if @relativity == :exactly return "expected target not to have #{@expected} #{@collection_name}, got #{@actual}" elsif @relativity == :at_most return "Isn't life confusing enough?\nInstead of having to figure out the meaning of this:\nshould_not have_at_most(\#{@expected}).\#{@collection_name}\nWe recommend that you use this instead:\nshould have_at_least(\#{@expected + 1}).\#{@collection_name}\n" elsif @relativity == :at_least return "Isn't life confusing enough?\nInstead of having to figure out the meaning of this:\nshould_not have_at_least(\#{@expected}).\#{@collection_name}\nWe recommend that you use this instead:\nshould have_at_most(\#{@expected - 1}).\#{@collection_name}\n" end end