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.
586 587 588 |
# File 'lib/oktest.rb', line 586 def initialize(actual) @actual = actual end |
Instance Method Details
#==(expected) ⇒ Object
595 596 597 598 |
# File 'lib/oktest.rb', line 595 def ==(expected) #; [!ymt1b] raises OktestError. raise OktestError, "JSON(): use `===` instead of `==`." end |
#===(expected) ⇒ Object
590 591 592 593 |
# File 'lib/oktest.rb', line 590 def ===(expected) #; [!spybn] raises NotImplementedError. raise NotImplementedError.new("#{self.class.name}#===(): not implemented yet.") end |
#fail(errmsg) ⇒ Object
600 601 602 603 |
# File 'lib/oktest.rb', line 600 def fail(errmsg) #; [!8qpsd] raises assertion error. raise Oktest::FAIL_EXCEPTION, errmsg end |