Class: Skooma::Matchers::BeValidDocument
- Inherits:
-
Object
- Object
- Skooma::Matchers::BeValidDocument
- Defined in:
- lib/skooma/matchers/be_valid_document.rb
Instance Method Summary collapse
Instance Method Details
#description ⇒ Object
16 17 18 |
# File 'lib/skooma/matchers/be_valid_document.rb', line 16 def description "be a valid OpenAPI document" end |
#failure_message ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/skooma/matchers/be_valid_document.rb', line 20 def return "expected value to be an OpenAPI object" unless comparable? <<~MSG must valid against OpenAPI specification: #{pretty(@result.output(:detailed))} MSG end |
#matches?(actual) ⇒ Boolean
8 9 10 11 12 13 14 |
# File 'lib/skooma/matchers/be_valid_document.rb', line 8 def matches?(actual) @actual = actual return false unless comparable? @result = @actual.validate @result.valid? end |