Module: OpenapiFirst::Test
- Defined in:
- lib/openapi_first/test.rb,
lib/openapi_first/test/methods.rb
Overview
Test integration
Defined Under Namespace
Modules: Methods
Class Method Summary collapse
Class Method Details
.[](api) ⇒ Object
13 14 15 16 17 |
# File 'lib/openapi_first/test.rb', line 13 def self.[](api) @registry[api] || raise(ArgumentError, "API description #{api} not found to be used via assert_api_conform. " \ 'Use OpenapiFirst::Test.register to load an API description first.') end |
.register(path, as: :default) ⇒ Object
8 9 10 11 |
# File 'lib/openapi_first/test.rb', line 8 def self.register(path, as: :default) @registry ||= {} @registry[as] = OpenapiFirst.load(path) end |