JustBeforeEach(func() { aufsCake = &layercake.AufsCake{ Cake: cake, Runner: runner, GraphRoot: baseDirectory, } }) Describe("DriverName", func() { BeforeEach(func() { cake.DriverNameReturns("driver-name") }) It("should delegate to the cake", func() { dn := aufsCake.DriverName() Expect(cake.DriverNameCallCount()).To(Equal(1)) Expect(dn).To(Equal("driver-name")) }) }) Describe("Create", func() { var ( parentDir string namespacedChildDir string otherNamespacedChildDir string ) BeforeEach(func() { var err error parentDir, err = ioutil.TempDir("", "parent-layer") Expect(err).NotTo(HaveOccurred())