Exception: MoreEqualAssay
- Inherits:
-
CompareAssay
- Object
- Exception
- Assertion
- CompareAssay
- MoreEqualAssay
- Defined in:
- lib/assay/more_equal_assay.rb
Overview
Compare assertion is used to test a comparision made by ‘#>=`.
NOTE: We are taking some leeway here with the name of this class, which ordinarily would be called ‘GreaterThanOrEqualAssay`. However, such a name is a bit winded. The shortest name then, without resorting to abbreviations, is more-equal, a monosyllabic reading of the operator itself. Since it is ordinarily meaningless to say something is “more equal” than something else, why not allow it to be meaningful and save ourselves all that uneccessary verbage?
Constant Summary
Constants inherited from Assertion
Constants included from Assay::Assertable
Class Method Summary collapse
-
.pass?(subject, criterion) ⇒ Boolean
Check assertion using ‘#>=` method.
Methods inherited from CompareAssay
Methods inherited from Assertion
by_name, by_operator, inherited, register, subclasses
Methods included from Assay::Assertable
#[], #assert!, #assert_message, #assertive_name, #assertor, #fail?, #operator, #pass?, #refute!, #refute_message
Class Method Details
.pass?(subject, criterion) ⇒ Boolean
Check assertion using ‘#>=` method.
20 21 22 |
# File 'lib/assay/more_equal_assay.rb', line 20 def self.pass?(subject, criterion) subject >= criterion end |