Skip to content

Instantly share code, notes, and snippets.

@elben
Created December 2, 2011 22:58
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 elben/1425237 to your computer and use it in GitHub Desktop.
Save elben/1425237 to your computer and use it in GitHub Desktop.
import org.specs2._
class HelloWorldSpec extends Specification { def is =
"This is a specification to check the 'Hello world' string" ^
p^
"The 'Hello world' string should" ^
"contain 11 characters" ! e1^
"start with 'Hello'" ! e2^
"end with 'world'" ! e3^
end
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