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: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
## Unreleased
4
4
5
5
- OpenapiFirst::Test.report_coverage now includes fractional digits when returning a coverage value to avoid reporting "0% / no requests made" even though some requests have been made.
6
+
- Add option to skip certain responses in coverage calculation
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,9 +149,10 @@ Here is how to set it up for RSpec in your `spec/spec_helper.rb`:
149
149
1. Register all OpenAPI documents to track coverage for and start tracking. This should go at the top of you test helper file before loading application code.
150
150
```ruby
151
151
require'openapi_first'
152
-
OpenapiFirst::Test.setup do |test|
152
+
OpenapiFirst::Test.setup do |s|
153
153
test.register('openapi/openapi.yaml')
154
154
test.minimum_coverage =100# Setting this will lead to an `exit 2` if coverage is below minimum
155
+
test.skip_response_coverage { it.status =='500' }
155
156
end
156
157
```
157
158
2. Wrap your app with silent request / response validation. This validates all requets/responses you do during your test run. (✷1)
0 commit comments