mockws
The trait provides a materializer you need in order to use MockWS and its Action { ... } definitions inside your testclasses.
Mix this trait into the tests where you use MockWS. WARNING: you have to call shutdownHelpers() after usage to avoid memory leaks.
shutdownHelpers()
You can also use the object if you dislike traits and like to instead import the functionality.
Example:
class MySpec extends FreeSpec with Matchers with MockWSHelpers with BeforeAndAfterAll { ... override def afterAll(): Unit = { shutdownHelpers() } }
The trait provides a materializer you need in order to use MockWS and its Action { ... } definitions inside your testclasses.
Mix this trait into the tests where you use MockWS. WARNING: you have to call
shutdownHelpers()
after usage to avoid memory leaks.You can also use the object if you dislike traits and like to instead import the functionality.
Example: