You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,12 +203,11 @@ Here is how to set it up:
203
203
204
204
### Configure test coverage
205
205
206
-
OpenapiFirst::Test raises an error when a request is not defined. You can deactivate this with:
206
+
OpenapiFirst::Test raises an error when a response status is not defined. You can deactivate this with:
207
207
208
208
```ruby
209
209
OpenapiFirst::Test.setup do |test|
210
-
# …
211
-
test.ignore_unknown_requests = true
210
+
[403, 401].each { test.ignored_unknown_status << it }
212
211
end
213
212
```
214
213
@@ -234,6 +233,15 @@ OpenapiFirst::Test.setup do |test|
234
233
end
235
234
```
236
235
236
+
OpenapiFirst::Test raises an error when a request is not defined. You can deactivate this with:
237
+
238
+
```ruby
239
+
OpenapiFirst::Test.setup do |test|
240
+
# …
241
+
test.ignore_unknown_requests = true
242
+
end
243
+
```
244
+
237
245
### Test assertions
238
246
239
247
openapi_first ships with a simple but powerful Test method to run request and response validation in your tests without using the middlewares. This is designed to be used with rack-test or Ruby on Rails integration tests or request specs.
0 commit comments