I am trying to follow the Scala tutorial and am getting the error object scalatest is not a member of package org
. All of the other instances of this error I can find here and on the web have the problem that the test file isn't under src/test, but that's not the case for me. I repeat, for the sake of those who keep marking this as a duplicate, the test file is under src/test, so that is not the problem. My build.sbt file says:
name := "TestExercise"
version := "0.1"
scalaVersion := "2.12.6"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.5" % "test"
src/main/scala/CubeCalculator says:
object CubeCalculator extends App {
def cube(x: Int) = {
x * x * x
}
}
and src/test/scala/CubeCalculatorTest says:
import org.scalatest.FunSuite
class CubeCalculatorTest extends FunSuite {
test("CubeCalculator.cube") {
assert(CubeCalculator.cube(3) === 27)
}
}
(Cut-and-pasted straight from the tutorial.)
So what am I doing wrong? Why can't my project access scalatest?