private void buildHelperMethod(MethodNode method) {
    Method helper = new HelperMethod(spec, method);
    spec.getMethods().add(helper);

    Block block = helper.addBlock(new AnonymousBlock(helper));
    List<Statement> stats = AstUtil.getStatements(method);
    block.getAst().addAll(stats);
    stats.clear();
  }
Given the abstract syntax tree of a Groovy class representing a Spock
specification, builds an object model of the specification.

@author Peter Niederwieser
spock-core/src/main/java/org/spockframework/compiler/SpecParser.java