News for hackers. Stuff that matters.
Re:Spek – A Specification Framework by frederikb on Monday February 17, 2014 @10:22AM (#7252421)
An interesting alternative to this is Spock [1], a specification framework for Java and Groovy with a nice Groovy DSL. Check out the new reference documentation [2] or try out some specifications using the web console [3].

It has a great syntax for data driven and interaction based syntax.

Data driven example:

  class Math extends Specification {
    def "maximum of two numbers"(int a, int b, int c) {
        expect:
        Math.max(a, b) == c

        where:
        a | b | c
        1 | 3 | 3
        7 | 4 | 4
        0 | 0 | 0
    }
  } 
[1] https://code.google.com/p/spock/

[2] http://docs.spockframework.org/en/latest/

[3] http://meetspock.appspot.com/

Re:Spek – A Specification Framework by vorg on Tuesday February 18, 2014 @03:31AM (#7257028)
> It has a great syntax for data driven and interaction based syntax.

With DSL's in groovy it always looks like the provided syntax is trying to code around Groovy's syntactic limitations, e.g. having to use the bar | in the example

    a | b | c
    1 | 3 | 3
    7 | 4 | 4