title: IntelliJ IDEA does not let me run ScalaTests from an SBT project any more
body: <p>I have a strange problem in IntelliJ IDEA: I have an SBT project which has ScalaTests. I organized my settings in blocks like this:</p>
  
  <pre><code>lazy val common = Seq(
    organization := "com.example.foo",
    version := "0.0.1-SNAPSHOT",
    scalaVersion := "2.10.5",
    fork in Test := true,
    testListeners += new JUnitXmlTestsListener(
      new File(target.value, "test-reports").getAbsolutePath
    )
  )
  
  lazy val testWithScalatest = Seq(
    libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.4" % "test"
  )
  
  lazy val bar = project.in(file("some/where/foo/bar")).settings(common).settings(testWithScalatest).settings(name:="bar")
  </code></pre>
  
  <p>When I run <code>sbt test</code>, the tests run fine without any errors. However, when I right-click the test class in the project explorer of IDEA, the "Run tests" option is not there. I <em>can</em> right-click the package the test class is in and select "Run ScalaTests in...", but then I get something like this:</p>
  
  <pre><code>Error running ScalaTests in 'bar': Cannot start process, the working directory C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 14.1.4\jre\jre\bin does not exist
  </code></pre>
  
  <p>When I try to edit the run configuration, the settings panel in the "Run/Debug Configurations" window is empty.</p>
  
  <p>I cannot add a new configuration either.</p>
  
  <p>What is the problem here?</p>
  
  <p>EDIT: I have the same problem when using Specs2.</p>