Class: Oktest::Matcher
- Inherits:
-
Object
- Object
- Oktest::Matcher
- Defined in:
- lib/oktest.rb
Direct Known Subclasses
Instance Method Summary collapse
- #==(expected) ⇒ Object
- #===(expected) ⇒ Object
- #fail(errmsg) ⇒ Object
-
#initialize(actual) ⇒ Matcher
constructor
A new instance of Matcher.
Constructor Details
#initialize(actual) ⇒ Matcher
Returns a new instance of Matcher.
599 600 601 |
# File 'lib/oktest.rb', line 599 def initialize(actual) @actual = actual end |
Instance Method Details
#==(expected) ⇒ Object
608 609 610 611 |
# File 'lib/oktest.rb', line 608 def ==(expected) #; [!ymt1b] raises OktestError. raise OktestError, "JSON(): use `===` instead of `==`." end |
#===(expected) ⇒ Object
603 604 605 606 |
# File 'lib/oktest.rb', line 603 def ===(expected) #; [!spybn] raises NotImplementedError. raise NotImplementedError.new("#{self.class.name}#===(): not implemented yet.") end |
#fail(errmsg) ⇒ Object
613 614 615 616 |
# File 'lib/oktest.rb', line 613 def fail(errmsg) #; [!8qpsd] raises assertion error. raise Oktest::FAIL_EXCEPTION, errmsg end |