Exception: BetterAssertDifference::DifferenceException
- Inherits:
-
StandardError
- Object
- StandardError
- BetterAssertDifference::DifferenceException
- Defined in:
- lib/better_assert_difference/exceptions/difference_exception.rb
Instance Method Summary collapse
-
#initialize(difference) ⇒ DifferenceException
constructor
A new instance of DifferenceException.
Constructor Details
#initialize(difference) ⇒ DifferenceException
Returns a new instance of DifferenceException.
4 5 6 7 8 9 10 11 12 |
# File 'lib/better_assert_difference/exceptions/difference_exception.rb', line 4 def initialize(difference) super( <<~ERROR \nDifference is a #{difference}, it must be an integer. If you want to assert the difference of multiple expressions wrap them in an array: assert_difference [Foo, Bar], 1 { } ERROR ) end |