Spock Web Console

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

parametrized max

Published 4 months ago by Mateusz with tags parametrized max math
Actions  ➤ Edit In Console Back To Console Show/Hide Line Numbers View Recent Scripts
import spock.lang.*

class MyFirstSpec extends Specification {

@Unroll("max(1,2) = #b")  
def "let's try this!"() {
    expect:
    Math.max(1, 2) == b
    
    where:
    b << [2,2,3]
  }
}