File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,7 +63,9 @@ def self.handle_exit
6363
6464 return if Coverage . result . coverage >= configuration . minimum_coverage
6565
66- raise OpenapiFirst ::Test ::CoverageError , 'Not all described requests and responses have been tested.'
66+ puts 'API Coverage fails with exit 2, because not all described requests and responses have been tested.'
67+
68+ exit 2
6769 end
6870
6971 # Print the coverage report
Original file line number Diff line number Diff line change 129129 expect ( OpenapiFirst ::Test ) . to receive ( :report_coverage )
130130 expect do
131131 described_class . handle_exit
132- end . to raise_error ( OpenapiFirst :: Test :: CoverageError )
132+ end . to raise_error ( SystemExit )
133133 end
134134
135135 context 'with full coverage' do
177177 expect ( OpenapiFirst ::Test ) . to receive ( :report_coverage )
178178 expect do
179179 described_class . handle_exit
180- end . to raise_error ( OpenapiFirst :: Test :: CoverageError )
180+ end . to raise_error ( SystemExit )
181181 end
182182 end
183183
You can’t perform that action at this time.
0 commit comments