offer TestKitBase trait, see #2174

This commit is contained in:
Roland 2012-06-04 10:03:41 +02:00
parent ebc919ba61
commit de59444795
3 changed files with 38 additions and 2 deletions

View file

@ -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, theres :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
------