To test Actor code with ScalaTest you have to mix in a lot of traits; sometimes it can be
difficult to remember them all. Inspired by a course led by Heiko
Seeberger I made this abstract class (it cannot be a
trait because it takes constructor parameters) that you can drop into a project.
You use it like this (extending the test part of my previous post on injecting Akka’s
TestProbe into actors):
I find this makes testing of Akka actors quite nice and clean.