Skip to content

Commit f76361e

Browse files
committed
reset environment in test
1 parent e9a1ae7 commit f76361e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

grails-core/src/test/groovy/org/grails/config/YamlPropertySourceLoaderSpec.groovy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
package org.grails.config
22

3+
import grails.util.Environment
34
import org.grails.config.yaml.YamlPropertySourceLoader
45
import org.springframework.core.io.FileSystemResource
56
import org.springframework.core.io.Resource
67
import spock.lang.Specification
78

89
class YamlPropertySourceLoaderSpec extends Specification {
910

11+
void setup() {
12+
// reset environment
13+
System.setProperty(Environment.KEY, "")
14+
}
15+
1016
def "ensure the config for environment is merged with single environment block"() {
1117
given: "A PropertySourcesConfig instance"
1218
def propertySource = new YamlPropertySourceLoader()

0 commit comments

Comments
 (0)