Scala seed project using sbt dependency manager (with cucumber plugin), cucumber for bdd cycle and scalatest+scalacheck for tdd cycle. This is a Giter8 template, which integrates beatifully with sbt.
You have to have latest scala
and sbt
available on your system.
On a mac you can get it via:
brew install scala
brew install sbt
It will install in sub directory (using the project name you choose.
sbt new spikerlabs/scala-seed.g8
sbt new spikerlabs/scala-seed.g8 --branch 3
The template will ask number of questions about desired versions of things, normally you should be fine to use defaults.
All the code and tests are hello world, but suggested structure is scalable towards complex real life project.
Upon completion, you can run all example tests via
sbt test cucumber
Examples:
- feature specification: src/test/resource/features/hello_world.feature
- feature implementation: src/test/scala/features/RuntimeMemoryContext.scala
- unit specification: src/test/scala/example/GreeterSpec.scala
- property test: src/test/scala/example/GreeterSpec.scala
- unit implementation: src/main/scala/example/Greeter.scala