1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Clear the test configurations before adding new ones.

This commit is contained in:
Cedric Beust 2016-01-12 02:47:11 +04:00
parent e493641d8d
commit 0dee89c8be

View file

@ -33,4 +33,9 @@ class TestConfig(val project: Project) {
}
@Directive
fun Project.test(init: TestConfig.() -> Unit) = this.testConfigs.add(TestConfig(this).apply { init() })
fun Project.test(init: TestConfig.() -> Unit) = let { project ->
with(this.testConfigs) {
clear()
add(TestConfig(project).apply { init() })
}
}