!tes #3638 ImplicitSender and DefaultTimeout requires TestKitBase

This commit is contained in:
Marcus Ljungblad 2013-12-11 11:27:09 -05:00
parent 3fdf20dfc6
commit 72acd5288b
2 changed files with 25 additions and 2 deletions

View file

@ -803,11 +803,11 @@ object TestProbe {
def apply()(implicit system: ActorSystem) = new TestProbe(system)
}
trait ImplicitSender { this: TestKit
trait ImplicitSender { this: TestKitBase
implicit def self = testActor
}
trait DefaultTimeout { this: TestKit
trait DefaultTimeout { this: TestKitBase
implicit val timeout: Timeout = testKitSettings.DefaultTimeout
}

View file

@ -0,0 +1,23 @@
/**
* Copyright (C) 2013-2013 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.testkit
import org.scalatest.{ WordSpec, BeforeAndAfterAll }
import org.scalatest.Matchers
import akka.actor.ActorSystem
@org.junit.runner.RunWith(classOf[org.scalatest.junit.JUnitRunner])
class ImplicitSenderSpec
extends WordSpec with Matchers with BeforeAndAfterAll with TestKitBase with ImplicitSender {
implicit lazy val system = ActorSystem("AkkaCustomSpec")
override def afterAll = system.shutdown
"An ImplicitSender" should {
"have testActor as its self" in {
self should be(testActor)
}
}
}