Created
December 2, 2011 22:58
-
-
Save elben/1425237 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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