Spock Web Console

subscribe to the feed Subscribe
GriffinHelloWorld (via #spockwebconsole)
tweet this script Tweet

GriffinHelloWorld

Published 1 month ago by Griffin with tags Test groovy
Actions  ➤ Edit In Console Back To Console Show/Hide Line Numbers View Recent Scripts
import spock.lang.*

class MyFirstSpec extends Specification {
    def "let's try this!"() {
        given:"Hello World introduction to Spock Test"
        def firstWord = "Hello"
        def secondWord = "World"

        when:"They are concatenated"
        def result = firstWord + " " + secondWord

        then:"We get a lovely greeting!"
        result == "Hello World"
    }
}