No tests executed - since 3.0.0

22 views
Skip to first unread message

Jakub Liska

unread,
Aug 23, 2017, 10:37:04 AM8/23/17
to scalatest-users
Hey,

after upgrading to 3.0.0, following setup is not executed, I tried FunSpec too :

abstract class AbstractTestSuite(_system: ActorSystem) extends TestKit(_system) with FreeSpecLike {
  protected def xxx: Unit

  "test" in {
    println("Hurayyy !!!")
  }
}

class BarSpec(_system: ActorSystem) extends AbstractTestSuite(_system: ActorSystem) {
  protected def xxx: Unit = ???
}

class FooSpec(_system: ActorSystem) extends AbstractTestSuite(_system: ActorSystem) {
  protected def xxx: Unit = ???
}

Jakub Liska

unread,
Aug 23, 2017, 10:47:54 AM8/23/17
to scalatest-users
I accidentally removed constructor from the abstract class : 

def this() = this(ActorSystem("blbla"))


Jakub Liska

unread,
Aug 23, 2017, 10:49:47 AM8/23/17
to scalatest-users
Got it, this works :

abstract class AbstractTestSuite(_system: ActorSystem) extends TestKit(_system) with FunSpecLike {

  protected def xxx: Unit

  it("test") {
    println("Hurayyy !!!")
  }
}

class BarSpec(_system: ActorSystem) extends AbstractTestSuite(_system: ActorSystem) {
  def this() = this(ActorSystem("blbla"))
  protected def xxx: Unit = ???
}

class FooSpec(_system: ActorSystem) extends AbstractTestSuite(_system: ActorSystem) {
  def this() = this(ActorSystem("blbla"))
Reply all
Reply to author
Forward
0 new messages