Play2 Framework/Scala/Specs2 - Do different FakeApplications share Singleton objects?
I'm quite new to Play2 and Scala. I'm writing a simple application that uses ReactiveMongo plugin. I wrote a simple object to use as DAO object UserDAO { def db: reactivemongo.api.DB = ReactiveMongoPlugin.db def collection: JSONCollection = db.collection[JSONCollection]("users") collection.indexesManager.ensure(Index(List("name" -> IndexType.Ascending), unique = true)) def insert(User): Future[LastError] = { collection.insert(unit) } def findOne(query: JsObject): Future[Option[User]] = { collection.find(query).one[User] } def removeOne(query: JsObject): Future[LastError] = { collection.remove