fix test failures related to using default system charset when reading files
Fixes 2 tests on Windows:
* FunctionContractSpec. should honor api v1.2 contract [declaration-concrete-controller.json] at endpoint [/default/concrete-controller]
* FunctionContractSpec. should honor api v1.2 contract [declaration-pet-service.json] at endpoint [/default/pet-service]
@@ -24,6 +24,6 @@ import org.codehaus.groovy.runtime.ResourceGroovyMethods
trait FileAccess {
String fileContents(String fileName) {
def resource = this.getClass().getResource("$fileName")
- return ResourceGroovyMethods.getText(resource)
+ return ResourceGroovyMethods.getText(resource, 'UTF-8')
}
}
\ No newline at end of file
