method
negative_failure_message
1.1.12 -
Show latest stable
-
0 notes -
Class: Spec::Matchers::Be
- 1.1.4 (0)
- 1.1.12 (0)
- 1.2.0
- 1.2.8
- 1.3.0
- 1.3.1
- What's this?
negative_failure_message()
public
Hide source
# File lib/spec/matchers/be.rb, line 35 def negative_failure_message if handling_predicate? "expected #{predicate}#{args_to_s} to return false, got #{@result.inspect}" else message = "'should_not be \#{@comparison_method} \#{expected}' not only FAILED,\nit reads really poorly.\n" raise message << ([:===,:==].include?(@comparison_method) ? "Why don't you try expressing it without the \"be\"?" : "Why don't you try expressing it in the positive?") end end