offer TestKitBase trait, see #2174
This commit is contained in:
parent
ebc919ba61
commit
de59444795
3 changed files with 38 additions and 2 deletions
|
|
@ -671,6 +671,20 @@ This section contains a collection of known gotchas with some other frameworks,
|
|||
which is by no means exhaustive and does not imply endorsement or special
|
||||
support.
|
||||
|
||||
When you need it to be a trait
|
||||
------------------------------
|
||||
|
||||
If for some reason it is a problem to inherit from :class:`TestKit` due to it
|
||||
being a concrete class instead of a trait, there’s :class:`TestKitBase`:
|
||||
|
||||
.. includecode:: code/docs/testkit/TestkitDocSpec.scala
|
||||
:include: test-kit-base
|
||||
:exclude: put-your-test-code-here
|
||||
|
||||
The ``implicit lazy val system`` must be declared exactly like that (you can of
|
||||
course pass arguments to the actor system factory as needed) because trait
|
||||
:class:`TestKitBase` needs the system during its construction.
|
||||
|
||||
Specs2
|
||||
------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue