title: How to make "test" classes available in the "it" (integration test) configuration?
body: <p>I would like to share a helper trait between my "test" and "it" configurations in SBT, but I have not figured out how.</p>
  
  <p>Here is a minimal example:</p>
  
  <p><strong>project/Build.scala</strong></p>
  
  <pre><code>import sbt._
  import Keys._
  
  object MyBuild extends Build {
  
    val scalaTest = "org.scalatest" %% "scalatest" % "2.0" % "test,it"
  
    lazy val myProject =
      Project(id = "my-project", base = file("."))
        .configs(IntegrationTest)
        .settings(Defaults.itSettings: _*)
        .settings(
          scalaVersion := "2.10.3",
          libraryDependencies ++= Seq(
            scalaTest
          )
        )
  }
  </code></pre>
  
  <p><strong>src/test/scala/Helpers.scala</strong></p>
  
  <pre><code>trait Helper {
    def help() { println("helping.") }
  }
  </code></pre>
  
  <p><strong>src/test/scala/TestSuite.scala</strong></p>
  
  <pre><code>import org.scalatest._
  
  class TestSuite extends FlatSpec with Matchers with Helper {
    "My code" should "work" in {
      help()
      true should be(true)
    }
  }
  </code></pre>
  
  <p><strong>src/it/scala/ItSuite.scala</strong></p>
  
  <pre><code>import org.scalatest._
  
  class ItSuite extends FlatSpec with Matchers with Helper {
    "My code" should "work" in {
      help()
      true should be(true)
    }
  }
  </code></pre>
  
  <p>then, in sbt, "test" works:</p>
  
  <pre><code>sbt&gt; test
  helping.
  [info] TestSuite:
  [info] My code
  [info] - should work
  [info] Run completed in 223 milliseconds.
  [info] Total number of tests run: 1
  [info] Suites: completed 1, aborted 0
  [info] Tests: succeeded 1, failed 0, canceled 0, ignored 0, pending 0
  [info] All tests passed.
  [success] Total time: 0 s, completed Dec 17, 2013 1:54:56 AM
  </code></pre>
  
  <p>but "it:test" doesn't compile:</p>
  
  <pre><code>sbt&gt; it:test
  [info] Compiling 1 Scala source to ./target/scala-2.10/it-classes...
  [error] ./src/it/scala/ItSuite.scala:3: not found: type Helper
  [error] class ItSuite extends FlatSpec with Matchers with Helper {
  [error]                                                   ^
  [error] ./src/it/scala/ItSuite.scala:5: not found: value help
  [error]     help()
  [error]     ^
  [error] two errors found
  [error] (it:compile) Compilation failed
  [error] Total time: 1 s, completed Dec 17, 2013 1:55:00 AM
  </code></pre>