Why to have a quick way to run minimal projects
Sometimes you just want to do a proof of concept or try something quick, that’s why it is a good idea to have a quick way to test things.
Sometimes the REPL, irb for Ruby or scala for Scala, is just not enough.
This post explain how to create a minimal project for Scala, with ScalaTest Library already setup.
Prequisites
- Java 8 JDK
javac -version
- sbt
sbt sbtVersion
Create the project
-
On the command line, create or go to the directory where your projects reside
-
Execute
sbt new scala/scalatest-example.g8
- Choose an arbitrary name for the project
Check everything is going well
- Go to the project folder
cd ${projectName}
- Clean, Compile, Test and Run the project
sbt clean compile test run