Spock Web Console

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

expectVsWhenthen

Published 1 month ago by Mr Man
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!"() {
    expect:
    Math.max(1, 2) == 2
  }
  def "let's try this other!"() {
    when:
    def x = Math.min(1, 2)

    then:
    x == 2
  }

}