Spock Web Console

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

increment

Published 2 years ago by d10xa with tags i++
Actions  ➤ Edit In Console Back To Console Show/Hide Line Numbers View Recent Scripts
import spock.lang.*

class IncrementSpec extends Specification {
  def "increment"() {
       given:
        def i = 1;
       when:
        i++
        i--
       then:
        i == old(i)  
  }
}