diff --git a/spring-cloud-contract-stub-runner/src/test/groovy/org/springframework/cloud/contract/stubrunner/ContractDownloaderSpec.groovy b/spring-cloud-contract-stub-runner/src/test/groovy/org/springframework/cloud/contract/stubrunner/ContractDownloaderSpec.groovy index 36e8d31154..9bd6958224 100644 --- a/spring-cloud-contract-stub-runner/src/test/groovy/org/springframework/cloud/contract/stubrunner/ContractDownloaderSpec.groovy +++ b/spring-cloud-contract-stub-runner/src/test/groovy/org/springframework/cloud/contract/stubrunner/ContractDownloaderSpec.groovy @@ -23,8 +23,9 @@ class ContractDownloaderSpec extends Specification { when: contractDownloader.unpackedDownloadedContracts(properties) then: - - properties.includedContracts == fileSeparated('^/some/path/to/somewhere/a/b/c/d.*$') + properties.includedContracts.startsWith('^') + properties.includedContracts.endsWith('$') + properties.includedContracts.contains(fileSeparated('/some/path/to/somewhere/a/b/c/d.*')) } def 'should set inclusion pattern on config when path pattern was explicitly provided without a separator at the beginning'() { @@ -38,7 +39,9 @@ class ContractDownloaderSpec extends Specification { when: contractDownloader.unpackedDownloadedContracts(properties) then: - properties.includedContracts == fileSeparated('^/some/path/to/somewhere/a/b/c/d.*$') + properties.includedContracts.startsWith('^') + properties.includedContracts.endsWith('$') + properties.includedContracts.contains(fileSeparated('/some/path/to/somewhere/a/b/c/d.*')) } private static String fileSeparated(String string) {