Skip to content

Commit 3be0862

Browse files
committed
Use a pattern to find files in integration test rather than fixed versions (#364)
1 parent aa0d7bb commit 3be0862

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

core-plugin/src/integTest/groovy/com/github/jrubygradle/core/IvyXmlProxyServerIntegrationSpec.groovy

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import org.junit.Rule
66
import org.junit.rules.TemporaryFolder
77
import spock.lang.Specification
88

9+
import java.util.regex.Pattern
10+
911

1012
class IvyXmlProxyServerIntegrationSpec extends Specification {
1113

@@ -133,6 +135,15 @@ class IvyXmlProxyServerIntegrationSpec extends Specification {
133135
.build()
134136

135137
then:
136-
new File(projectDir,'build/something/asciidoctor-2.0.9.gem').exists()
138+
findFiles ~/^asciidoctor-2.*gem$/
139+
}
140+
141+
List<File> findFiles(Pattern pat) {
142+
new File(projectDir,'build/something').listFiles( new FilenameFilter() {
143+
@Override
144+
boolean accept(File dir, String name) {
145+
name =~ pat
146+
}
147+
}) as List<File>
137148
}
138149
}

0 commit comments

Comments
 (0)