Spock Web Console

subscribe to the feed Subscribe
sample-spock (via #spockwebconsole)
tweet this script Tweet

sample-spock

Published 4 months ago by koji
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!"() {
    setup:
    def obj = new Hoge(name:'Groovy')

    expect:
    Math.max(1, 2) == 2
    GroovySystem.version == "2.4.1"
    obj.name == 'Groovy'
  }
}

class Hoge {
    String name
}