Class: Apivore::AllRoutesTestedValidator
- Inherits:
-
Object
- Object
- Apivore::AllRoutesTestedValidator
- Defined in:
- lib/apivore/all_routes_tested_validator.rb
Instance Method Summary collapse
Instance Method Details
#description ⇒ Object
17 18 19 |
# File 'lib/apivore/all_routes_tested_validator.rb', line 17 def description "have tested all documented routes" end |
#failure_message ⇒ Object
21 22 23 |
# File 'lib/apivore/all_routes_tested_validator.rb', line 21 def @errors.join("\n") end |
#matches?(swagger_checker) ⇒ Boolean
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/apivore/all_routes_tested_validator.rb', line 4 def matches?(swagger_checker) @errors = [] swagger_checker.untested_mappings.each do |path, methods| methods.each do |method, codes| codes.each do |code, _| @errors << "#{method} #{path} is untested for response code #{code}" end end end @errors.empty? end |