)) }) }) Context("when there are not routes", func() { It("tells the user when no routes were found", func() { runCommand() Expect(ui.Outputs).To(ContainSubstrings( []string{"Getting routes"}, []string{"No routes found"}, )) }) }) Context("when there is an error listing routes", func() { BeforeEach(func() { routeRepo.ListErr = true }) It("returns an error to the user", func() { runCommand() Expect(ui.Outputs).To(ContainSubstrings( []string{"Getting routes"}, []string{"FAILED"}, )) }) }) })