Skip to content

Instantly share code, notes, and snippets.

@pj
Created October 18, 2014 16:08
Show Gist options
  • Save pj/9d226b62b7f138802954 to your computer and use it in GitHub Desktop.
Save pj/9d226b62b7f138802954 to your computer and use it in GitHub Desktop.
Order of BeforeAndAfterAll and OneAppPerSuite in scalatest with play and reactive couchbase
// To use PlayCouchbase in before or after methods the traits have to be in this order...
class FacebookServiceSpec extends PlaySpec with BeforeAndAfterAll with OneAppPerSuite {
override def beforeAll = {
val bucket = PlayCouchbase.bucket("default")
}
}
// ... Not like this
class FacebookServiceSpec extends PlaySpec with OneAppPerSuite with BeforeAndAfterAll {
override def beforeAll = {
val bucket = PlayCouchbase.bucket("default")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment