Spock Testing Framework
Overview
Qualified supports writing tests for Groovy using Spock.
Quick Start
- Solution Code
class Adder {
static def add(a, b) { a + b }
}
- Test Fixture:
import spock.lang.Specification
class AdderSpec extends Specification {
def "Adder.add returns the sum"() {
expect:
assert Adder.add(1, 1) == 2
}
}
Learn More
You can learn more on the Spock website.