Skip to content

Commit 7e680e1

Browse files
update to spock 1.0, groovy 2.4.3
1 parent e313503 commit 7e680e1

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ repositories() {
66
}
77

88
dependencies {
9-
compile "org.codehaus.groovy:groovy:2.1.3"
10-
compile "org.spockframework:spock-core:0.7-groovy-2.0"
9+
compile "org.codehaus.groovy:groovy:2.4.3"
10+
compile "org.spockframework:spock-core:1.0-groovy-2.4"
1111
}
1212

13-
version = "0.1-SNAPSHOT"
13+
version = "0.2-SNAPSHOT"
1414
group = "com.anotherchrisberry"

src/main/groovy/com/anotherchrisberry/spock/extensions/retry/RetryInterceptor.groovy

+8-4
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@ class RetryInterceptor implements IMethodInterceptor {
2323
if (attempts > retryMax) {
2424
throw t
2525
}
26-
if (invocation.spec.cleanupMethod.reflection) {
27-
ReflectionUtil.invokeMethod(invocation.target, invocation.spec.cleanupMethod.reflection)
26+
invocation.spec.cleanupMethods.each {
27+
if (it.reflection) {
28+
ReflectionUtil.invokeMethod(invocation.target, it.reflection)
29+
}
2830
}
29-
if (invocation.spec.setupMethod.reflection) {
30-
ReflectionUtil.invokeMethod(invocation.target, invocation.spec.setupMethod.reflection)
31+
invocation.spec.setupMethods.each {
32+
if (it.reflection) {
33+
ReflectionUtil.invokeMethod(invocation.target, it.reflection)
34+
}
3135
}
3236
}
3337
}

0 commit comments

Comments
 (0)