add docs for ExtractRoute, see #2337

This commit is contained in:
Roland 2012-07-25 20:48:32 +02:00
parent b2ce64fb6f
commit faae09ab4e
4 changed files with 74 additions and 9 deletions

View file

@ -707,3 +707,17 @@ Some `Specs2 <http://specs2.org>`_ users have contributed examples of how to wor
* Specifications are by default executed concurrently, which requires some care
when writing the tests or alternatively the ``sequential`` keyword.
Testing Custom Router Logic
===========================
Given the following custom (dummy) router:
.. includecode:: ../../akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala#custom-router
This might be tested by dispatching messages and asserting their reception at
the right destinations, but that can be inconvenient. Therefore exists the
:obj:`ExtractRoute` extractor, which can be used like so:
.. includecode:: ../../akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala#test-route