method
failure_message_for_should
1.3.0 -
Show latest stable
-
0 notes -
Class: Spec::Matchers::Change
- 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()
public
Hide source
# File lib/spec/matchers/change.rb, line 39 def failure_message_for_should if @to "#{@message} should have been changed to #{@to.inspect}, but is now #{@after.inspect}" elsif @from "#{@message} should have initially been #{@from.inspect}, but was #{@before.inspect}" elsif @amount "#{@message} should have been changed by #{@amount.inspect}, but was changed by #{actual_delta.inspect}" elsif @minimum "#{@message} should have been changed by at least #{@minimum.inspect}, but was changed by #{actual_delta.inspect}" elsif @maximum "#{@message} should have been changed by at most #{@maximum.inspect}, but was changed by #{actual_delta.inspect}" else "#{@message} should have changed, but is still #{@before.inspect}" end end