Class: Ward::Matchers::EqualTo
- Defined in:
- lib/ward/matchers/equal_to.rb
Overview
TODO:
Once the validator DSL is is available, amend the class documentation to provide an example of how to call is
and is_not
with a value.
Tests whether the validation value is equal in value to – but not necessarily the same object as – the expected value.
Instance Attribute Summary
Attributes inherited from Matcher
Instance Method Summary collapse
-
#matches?(actual) ⇒ Boolean
Returns whether the given value is equal to the expected value.
Methods inherited from Matcher
#customise_error_values, error_id, #initialize
Constructor Details
This class inherits a constructor from Ward::Matchers::Matcher
Instance Method Details
#matches?(actual) ⇒ Boolean
Returns whether the given value is equal to the expected value.
27 28 29 |
# File 'lib/ward/matchers/equal_to.rb', line 27 def matches?(actual) actual.eql?(@expected) end |