Skip to content

Commit

Permalink
Merge pull request #54 from shipkit/sf
Browse files Browse the repository at this point in the history
Fixed the test
  • Loading branch information
shestee authored Dec 7, 2020
2 parents 3f5a211 + c8ab4aa commit 8133f90
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package org.shipkit.auto.version


import spock.lang.IgnoreIf

//ignore the test when there is no 'ls' utility
@IgnoreIf({ !commandAvailable("ls") })

class ProcessRunnerTest extends TmpFolderSpecification {

def "runs processes and returns output"() {
Expand Down Expand Up @@ -35,9 +33,10 @@ class ProcessRunnerTest extends TmpFolderSpecification {

then:
def e = thrown(ShipkitAutoVersionException)
e.message.startsWith """[shipkit-auto-version] Problems executing command (exit code: 1): ls --kaboom
e.message.startsWith "[shipkit-auto-version] Problems executing command (exit code: "
e.message.contains """ls --kaboom
Output:
ls: illegal option"""
ls: """
}

static boolean commandAvailable(String command) {
Expand Down

0 comments on commit 8133f90

Please sign in to comment.