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