Spock Web Console

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

Unroll

Published 1 year ago by Mark with tags unroll
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 {
  @Unroll("#featureName of #first and #second should be #max")
  def "max"() {
    expect:
    Math.max(first, second) == max

    where:
    first | second | max
    1     | 2      | 2
    1     | 2      | 3
    2     | 1      | 3
  }
}