Spock Web Console

subscribe to the feed Subscribe
Hello World Spock (via #spockwebconsole)
tweet this script Tweet

Hello World Spock

Published 6 months ago by Dublintech with tags Hello World Spock
Actions  ➤ Edit In Console Back To Console Show/Hide Line Numbers View Recent Scripts
import spock.lang.*

// Hit 'Run Script' below
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"
  }
}