gradle-plugin: Add a test for default values
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
|||||||
|
package org.jetbrains.kotlin.gradle.plugin.test
|
||||||
|
|
||||||
|
import org.gradle.testkit.runner.TaskOutcome
|
||||||
|
import org.junit.Rule
|
||||||
|
import org.junit.rules.TemporaryFolder
|
||||||
|
import spock.lang.Specification
|
||||||
|
|
||||||
|
|
||||||
|
class DefaultSpecification extends Specification {
|
||||||
|
|
||||||
|
@Rule
|
||||||
|
TemporaryFolder tmpFolder = new TemporaryFolder()
|
||||||
|
|
||||||
|
def 'Plugin should build a project without additional settings'() {
|
||||||
|
when:
|
||||||
|
def project = KonanInteropProject.create(tmpFolder) { KonanInteropProject it ->
|
||||||
|
it.buildFile.write("""
|
||||||
|
plugins { id 'konan' }
|
||||||
|
konanInterop { stdio {} }
|
||||||
|
konanArtifacts { main {} }
|
||||||
|
""".stripIndent())
|
||||||
|
}
|
||||||
|
def result = project.createRunner().withArguments('build').build()
|
||||||
|
|
||||||
|
then:
|
||||||
|
!result.tasks.collect { it.outcome }.contains(TaskOutcome.FAILED)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user