github.com/jghiloni/cli@v6.28.1-0.20170628223758-0ce05fe032a2+incompatible/integration/isolated/push_command_with_app_dir_test.go (about)

     1  package isolated
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/integration/helpers"
     5  	. "github.com/onsi/ginkgo"
     6  	. "github.com/onsi/gomega"
     7  	. "github.com/onsi/gomega/gbytes"
     8  	. "github.com/onsi/gomega/gexec"
     9  )
    10  
    11  var _ = Describe("Push with app directory", func() {
    12  	Context("when the specified app directory does not exist", func() {
    13  		It("displays a path does not exist error, help, and exits 1", func() {
    14  			session := helpers.CF("push", "-f", "./non-existant-dir/")
    15  			Eventually(session.Err).Should(Say("Incorrect Usage: The specified path './non-existant-dir/' does not exist."))
    16  			Eventually(session.Out).Should(Say("NAME:"))
    17  			Eventually(session.Out).Should(Say("USAGE:"))
    18  			Eventually(session).Should(Exit(1))
    19  		})
    20  	})
    21  })