Spock Web Console

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

Max example

Published 9 months ago by Awaneesh
Actions  ➤ Edit In Console Back To Console Show/Hide Line Numbers View Recent Scripts
import spock.lang.*

// Hit 'Run Script' below
@Unroll
class MyFirstSpec extends Specification {
  def "max of #a and #b is #c"() {
    expect:
    Math.max(a, b) == c
    where :
     a|b||c
     1| 2|| 1
      2|5|| 2
      3 |1|| 3
  }
}