Create a wrapper to launch the stubber nicely, programmatically.
Closed this issue · 2 comments
davesmith00000 commented
Related to discussions about starting and stopping Http4s nicely itself.
https://gitter.im/http4s/http4s?at=58d50e7419cdf803632bf663
Maya and Bill have done work around this independently, should compare notes.
davesmith00000 commented
Related: #47
davesmith00000 commented
From version 2.3.0-RC1 you can now grab an IPactStubber
e.g.:
val stubber = com.itv.scalapact.http.serverInstance
Which gives you methods to start and shutdown the stubber.
There is a catch, you need to decide how to keep is running. Scala-Pact employs two strategies:
-
Runnable
-
Wait for input to terminate
Depending on the use case.