title: How to stack behaviour with traits extending BeforeAfterAll
body: <p>I'm in a situtation where I have 2 traits extending BeforeAfterAll doing different actions for integration tests: One managing the database and the other the file system. For example:</p>
  
  <pre><code>trait DBSpecification extends BeforeAfterAll {
  
    override def beforeAll() = {
      println("DB -&gt; BeforeAll")
    }
  
    override def afterAll() = {
      println("DB -&gt; AfterAll")
    }
  }
  
  trait FileSystemSpecification extends BeforeAfterAll {
  
    override def beforeAll() = {
      println("FileSystem -&gt; BeforeAll")
    }
  
    override def afterAll() = {
      println("FileSystem -&gt; AfterAll")
    }
  }
  
  class MyTest extends Specification with DBSpecification with FileSystemSpecification {
  
    "some test" in {
      1 ==== 1
    }
  
  }
  </code></pre>
  
  <p>If I do like this, only the prints of the last trait are executed, in this case FileSystemSpecification. If I try calling <code>super</code> from the traits, I start having some compilation problems. I've tried already a bunch of ways, but couldn't figure out the solution.</p>
  
  <p>ScalaTest has some examples on its <a href="http://www.scalatest.org/user_guide/sharing_fixtures#composingFixtures.html" rel="nofollow noreferrer">documentation</a>, but couldn't find a way with Specs2.</p>
  
  <p>Any ideas?</p>