Spock Testing Framework

Overview

Qualified supports writing tests for Groovy using Spock.

Basic Example

Solution

class Adder {
  static def add(a, b) { a + b }
}

Tests

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.