var _ = Describe("Application", func() { const appName = "foo" var s goa.Service BeforeEach(func() { s = goa.New(appName) }) Describe("New", func() { It("creates an application", func() { Ω(s).ShouldNot(BeNil()) }) It("initializes the application fields", func() { Ω(s.Name()).Should(Equal(appName)) Ω(s).Should(BeAssignableToTypeOf(&goa.Application{})) app, _ := s.(*goa.Application) Ω(app.Name()).Should(Equal(appName)) Ω(app.Logger).ShouldNot(BeNil()) Ω(app.Router).ShouldNot(BeNil()) }) }) Describe("Use", func() { Context("with a valid middleware", func() { var m goa.Middleware BeforeEach(func() { m = goa.RequestID() })