How to fail a cucumber scenario when rails app returns internal server error?

343 Views Asked by At

The tech stack that we use for functional tests is cucumber with stubby4j for stubbing requests. Sometimes if there is no stub found for a request, rails throws "internal server error" but our functional tests passes in some cases.

Requirement is:

When any call made in rails app returns HTTP error code say 500, I want my cucumber scenario to fail. Is there any way to do this?

0

There are 0 best solutions below