Skip to content

Instantly share code, notes, and snippets.

@okaminu
Created March 18, 2021 13:11
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 okaminu/a576a7bb658e67cc5ccab627e2fa62ba to your computer and use it in GitHub Desktop.
Save okaminu/a576a7bb658e67cc5ccab627e2fa62ba to your computer and use it in GitHub Desktop.
class HelloWorldSpec 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