title: sbt: Add dependency on scalatest library. Where?
body: <p>I created a scala project using SBT and wrote some unit test cases using scalatest. But somehow <code>sbt test</code> can't find the org.scalatest package.</p>
  
  <p>Here my project definition files:</p>
  
  <ul>
  <li>Sources are in <code>src/main/scala respective src/test/scala</code></li>
  <li><p><code>build.sbt</code>:</p>
  
  <pre><code>name := "MyProject"
  
  version := "0.1"
  
  scalaVersion := "2.9.2"
  </code></pre></li>
  <li><p><code>project/plugins.sbt</code>:</p>
  
  <pre><code>addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0")
  </code></pre></li>
  <li><p><code>project/build.sbt</code>:</p>
  
  <pre><code>libraryDependencies += "org.scalatest" %% "scalatest" % "1.8" % "test"
  </code></pre></li>
  </ul>
  
  <p>I'm using SBT 0.11.3.</p>
  
  <p>Compiling the program using <code>sbt compile</code> on the console works fine.
  Furthermore I found the scalatest jar in <code>~/.ivy2</code>, so SBT must have downloaded it.</p>
  
  <p>But when running <code>sbt test</code>, it says</p>
  
  <pre><code>object scalatest is not a member of package org
  [error] import org.scalatest.FlatSpec
  ...[many errors alike]
  </code></pre>
  
  <p>And running <code>sbt eclipse</code> creates a .classpath that doesn't contain the scalatest jar.</p>
  
  <p>Do I have to specify the test dependencies somewhere else? How should I add the scalatest library?</p>