github.com/randomtask1155/cli@v6.41.1-0.20181227003417-a98eed78cbde+incompatible/integration/helpers/app_test.go (about) 1 package helpers_test 2 3 import ( 4 "code.cloudfoundry.org/cli/integration/helpers" 5 ) 6 7 import ( 8 . "github.com/onsi/ginkgo" 9 . "github.com/onsi/gomega" 10 . "github.com/onsi/gomega/gexec" 11 ) 12 13 func ExampleWithHelloWorldApp() { 14 var appName string 15 16 When("the app exists", func() { 17 BeforeEach(func() { 18 appName = helpers.PrefixedRandomName("app") 19 20 helpers.WithHelloWorldApp(func(appDir string) { 21 Eventually(helpers.CustomCF(helpers.CFEnv{WorkingDirectory: appDir}, "push", appName)).Should(Exit(0)) 22 }) 23 }) 24 }) 25 }