diff options
-rw-r--r-- | core/src/main/scala/com/softwaremill/sttp/testing/SttpBackendStub.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/main/scala/com/softwaremill/sttp/testing/SttpBackendStub.scala b/core/src/main/scala/com/softwaremill/sttp/testing/SttpBackendStub.scala index 114cd61..9bd3120 100644 --- a/core/src/main/scala/com/softwaremill/sttp/testing/SttpBackendStub.scala +++ b/core/src/main/scala/com/softwaremill/sttp/testing/SttpBackendStub.scala @@ -43,6 +43,14 @@ class SttpBackendStub[R[_], S] private ( new WhenRequest(p) /** + * Specify how the stub backend should respond to any request (catch-all). + * + * Note that the stubs are immutable, and each new + * specification that is added yields a new stub instance. + */ + def whenAnyRequest: WhenRequest = whenRequestMatches(_ => true) + + /** * Specify how the stub backend should respond to requests using the * given partial function. * |