public List<File> findRunnableSpecs(File baseDir) throws IOException {
    if (!baseDir.isDirectory())
      throw new FileNotFoundException(String.format("directory %s not found", baseDir));

    List<File> specs = new ArrayList<>();
    doFindRunnableSpecs(baseDir, specs);
    sort(specs);
    return specs;
  }
Finds all class files below a base directory that contain a runnable spec.

@author Peter Niederwieser
spock-core/src/main/java/org/spockframework/buildsupport/SpecClassFileFinder.java