Skip to content

Instantly share code, notes, and snippets.

Created February 11, 2014 02:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save chbatey/8928367 to your computer and use it in GitHub Desktop.
Akka: Testing a message sent to an actor's parent
class ChildActorTest extends TestKit(ActorSystem("ChildActorTest")) with FunSuiteLike with ShouldMatchers {
test("Should inform parent when told to do something") {
val parent = TestProbe()
val underTest = TestActorRef(Props[ChildActor], parent.ref, "ChildActor")
underTest ! "Do something"
parent.expectMsg("I was told to do something and I did it")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment