From f56eba4136298239c4083e78af809c1cc1281014 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Mon, 10 Oct 2016 14:52:14 +0200 Subject: [PATCH] Fixing the tests for Windows --- .../contract/stubrunner/ContractDownloaderSpec.groovy | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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) {