Added missing unit test
@@ -2,6 +2,9 @@ package org.shipkit.internal.gradle.init
import org.gradle.testfixtures.ProjectBuilder
import org.shipkit.gradle.init.InitShipkitFileTask
+import org.shipkit.gradle.init.InitVersioningTask
+import org.shipkit.gradle.version.BumpVersionFileTask
+import org.shipkit.internal.gradle.version.VersioningPlugin
import spock.lang.Specification
import static InitPlugin.INIT_TRAVIS_TASK
@@ -40,4 +43,14 @@ class InitPluginTest extends Specification {
InitShipkitFileTask task = project.tasks.findByName(InitPlugin.INIT_SHIPKIT_FILE_TASK)
task.shipkitFile == project.file("gradle/shipkit.gradle")
}
+
+ def "initializes versioning file task"() {
+ when:
+ project.plugins.apply(InitPlugin)
+
+ then:
+ InitVersioningTask task = project.tasks.findByName(InitPlugin.INIT_VERSIONING_TASK)
+ BumpVersionFileTask bumpTask = project.tasks[VersioningPlugin.BUMP_VERSION_FILE_TASK]
+ bumpTask.versionFile == task.versionFile
+ }
}
