Class: Stendhal::Matchers::Equality
- Inherits:
-
AbstractMatcher
- Object
- AbstractMatcher
- Stendhal::Matchers::Equality
- Defined in:
- lib/stendhal/matchers/equality.rb
Instance Attribute Summary
Attributes inherited from AbstractMatcher
Instance Method Summary collapse
Methods inherited from AbstractMatcher
Constructor Details
This class inherits a constructor from Stendhal::Matchers::AbstractMatcher
Instance Method Details
#match(original, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/stendhal/matchers/equality.rb', line 5 def match(original, = {}) = "expected #{original.inspect} #{[:negative] ? 'to be different than' : 'to equal'} #{@target.inspect}" if [:negative] raise Stendhal::Exceptions::ExpectationNotMet.new() if @target == original else raise Stendhal::Exceptions::ExpectationNotMet.new() unless @target == original end true end |