title: Play2 & ReactiveMongo testing issue: db connection right after test fails
body: <p>I am implementing a file storage service, which is taking a file and saving it into gridFS with special metadata. Of course, I want to be sure everything's working in integration -- files are really stored in database and then retrieved from it.</p>
  
  <p>I use Play Framework 2.1.3 Scala and ReactiveMongo 0.9.</p>
  
  <p>My test cases looks like the following:</p>
  
  <pre><code>"show empty uploaded size on init" in {
    running(FakeApplication()) {
      Await.result(FileStorage.getFilesSize(profileId), duration) must beNone
    }
  }
  </code></pre>
  
  <p>I have tried to wrap every case with <code>running</code>, or all cases, or even <code>Thread.sleep</code>. But database is always up <em>after</em> test fails.</p>
  
  <pre><code>[error] There is no started application
  [error] play.api.Play$$anonfun$current$1.apply(Play.scala:51)
  [error] play.api.Play$$anonfun$current$1.apply(Play.scala:51)
  [error] play.api.Play$.current(Play.scala:51)
  [error] content.FileStorage$.db$lzycompute(FileStorage.scala:32)
  
  ...
  
  [info] Total for specification FileStorageSpec
  [info] Finished in 21 ms
  [info] 5 examples, 1 failure, 4 errors
  [info] 
  [info] application - ReactiveMongoPlugin starting...
  [info] application - ReactiveMongoPlugin successfully started with db 'test'! Servers:
          [localhost:27017]
  [info] play - Starting application default Akka system.
  [info] play - Shutdown application default Akka system.
  </code></pre>
  
  <p>What am I doing wrong? How do you test ReactiveMongo applications?</p>