Expect(ui.Outputs()).To(ContainSubstrings( []string{"Refreshing went wrong"}, []string{"FAILED"}, )) }) }) Context("when the named service exists", func() { It("disables the service", func() { Expect(runCommand([]string{serviceName})).To(BeTrue()) Expect(ui.Outputs()).To(ContainSubstrings( []string{"OK"}, )) Expect(actor.UpdateAllPlansForServiceCallCount()).To(Equal(1)) service, disable := actor.UpdateAllPlansForServiceArgsForCall(0) Expect(service).To(Equal(serviceName)) Expect(disable).To(BeFalse()) }) It("prints an error if updating the plans fails", func() { actor.UpdateAllPlansForServiceReturns(errors.New("Kaboom!")) Expect(runCommand([]string{serviceName})).To(BeFalse()) Expect(ui.Outputs()).To(ContainSubstrings( []string{"Kaboom!"}, )) }) Context("The user provides a plan", func() { It("prints an error if updating the plan fails", func() {