Skip to content

Instantly share code, notes, and snippets.

@rkmathi
Last active December 26, 2015 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rkmathi/7130768 to your computer and use it in GitHub Desktop.
Save rkmathi/7130768 to your computer and use it in GitHub Desktop.
https://github.com/rkmathi/basic-project.g8 => src/main/g8/src/test/scala/MainSpec.scala
import org.specs2._
class AppSpec extends Specification {
def is = s2"""
This is a specification to check the 'Hello world' string
The 'Hello world' string should
contain 11 characters $e1
start with 'Hello' $e2
end with 'world' $e3
"""
def e1 = "Hello world" must have size(11)
def e2 = "Hello world" must startWith("Hello")
def e3 = "Hello world" must endWith("world")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment