Skip to content

Commit

Permalink
Merge pull request #2 from anotherchrisberry/spock1-update
Browse files Browse the repository at this point in the history
update to spock 1.0, groovy 2.4.3
  • Loading branch information
anotherchrisberry committed Apr 15, 2015
2 parents e313503 + 7e680e1 commit f343488
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ repositories() {
}

dependencies {
compile "org.codehaus.groovy:groovy:2.1.3"
compile "org.spockframework:spock-core:0.7-groovy-2.0"
compile "org.codehaus.groovy:groovy:2.4.3"
compile "org.spockframework:spock-core:1.0-groovy-2.4"
}

version = "0.1-SNAPSHOT"
version = "0.2-SNAPSHOT"
group = "com.anotherchrisberry"
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ class RetryInterceptor implements IMethodInterceptor {
if (attempts > retryMax) {
throw t
}
if (invocation.spec.cleanupMethod.reflection) {
ReflectionUtil.invokeMethod(invocation.target, invocation.spec.cleanupMethod.reflection)
invocation.spec.cleanupMethods.each {
if (it.reflection) {
ReflectionUtil.invokeMethod(invocation.target, it.reflection)
}
}
if (invocation.spec.setupMethod.reflection) {
ReflectionUtil.invokeMethod(invocation.target, invocation.spec.setupMethod.reflection)
invocation.spec.setupMethods.each {
if (it.reflection) {
ReflectionUtil.invokeMethod(invocation.target, it.reflection)
}
}
}
}
Expand Down

0 comments on commit f343488

Please sign in to comment.