Skip to content

Instantly share code, notes, and snippets.

@DerSchimi
Created November 19, 2014 15:56
Show Gist options
  • Save DerSchimi/681349209dafadd37a73 to your computer and use it in GitHub Desktop.
Save DerSchimi/681349209dafadd37a73 to your computer and use it in GitHub Desktop.
Groovy reading spock feature methods
private void checkAllMethods(Class c){
def testmethods = c.methods.findAll {it.getName().startsWith('$spock_feature')}
println "methods: " +testmethods*.getName()
testmethods.each {
Method m = it;
m.getAnnotations().each {
println it
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment