Skip to content

Instantly share code, notes, and snippets.

@geidsvig
geidsvig / ExampleUnitTest.scala
Created July 6, 2020 18:01
Example unit test using scala-test FlatSpecLike and other generally useful traits.
//package `your package`
import org.scalatest.{FlatSpecLike, GivenWhenThen, Matchers}
class ExampleUnitTest extends FlatSpecLike with GivenWhenThen with Matchers {
"A service/class that you want to test" should "provide some result/expectation" in {
Given("Some service/class")
def service(i: Int) = i * 2
@geidsvig
geidsvig / scala.rb
Last active December 17, 2015 10:48 — forked from cstrahan/scala.rb
# to install the latest stable version:
brew install scala --with-docs
# to install scala-2.10.1:
brew install https://raw.github.com/gist/5597101/scala.rb --with-docs
# to switch versions (from https://github.com/mxcl/homebrew/wiki/External-Commands):
brew switch scala 2.9.2
brew switch scala 2.10.1