Expect(repo.CreateBuildpack.Enabled).To(BeNil()) Expect(ui.FailedWithUsage).To(BeFalse()) testassert.SliceContains(ui.Outputs, testassert.Lines{ {"Creating buildpack", "my-buildpack"}, {"OK"}, {"Uploading buildpack", "my-buildpack"}, {"OK"}, }) testassert.SliceDoesNotContain(ui.Outputs, testassert.Lines{ {"FAILED"}, }) }) It("warns the user when the buildpack already exists", func() { repo.CreateBuildpackExists = true context := testcmd.NewContext("create-buildpack", []string{"my-buildpack", "my.war", "5"}) testcmd.RunCommand(cmd, context, requirementsFactory) testassert.SliceContains(ui.Outputs, testassert.Lines{ {"Creating buildpack", "my-buildpack"}, {"OK"}, {"my-buildpack", "already exists"}, {"tip", "update-buildpack"}, }) testassert.SliceDoesNotContain(ui.Outputs, testassert.Lines{ {"FAILED"}, }) }) It("enables the buildpack when given the --enabled flag", func() {