Started using factory method for ExecCommands in test
@@ -3,14 +3,16 @@ package org.shipkit.gradle.exec
import org.gradle.testfixtures.ProjectBuilder
import spock.lang.Specification
+import static org.shipkit.internal.gradle.exec.ExecCommandFactory.execCommand
+
class ShipkitExecTaskTest extends Specification {
def project = new ProjectBuilder().build()
def "executes with clean output"() {
def t = (ShipkitExecTask) project.tasks.create("t", ShipkitExecTask)
- t.execCommands.add(new ExecCommand("Saying first", ["echo", "first"]))
- t.execCommands.add(new ExecCommand("Saying second", ["echo", "second"]))
+ t.execCommands.add(execCommand("Saying first", ["echo", "first"]))
+ t.execCommands.add(execCommand("Saying second", ["echo", "second"]))
when:
t.execute()
