delegateMounter.IsMountPointPartitionPath = "fake-partition-path" partitionPath, isMountPoint, err := mounter.IsMountPoint("fake-device-path") // Outputs Expect(partitionPath).To(Equal("fake-partition-path")) Expect(isMountPoint).To(BeTrue()) Expect(err).To(Equal(delegateErr)) // Inputs Expect(delegateMounter.IsMountPointPath).To(Equal("fake-device-path")) }) }) Describe("IsMounted", func() { It("delegates to mounter", func() { delegateMounter.IsMountedErr = delegateErr delegateMounter.IsMountedResult = true isMounted, err := mounter.IsMounted("fake-device-path") // Outputs Expect(isMounted).To(BeTrue()) Expect(err).To(Equal(delegateErr)) // Inputs Expect(delegateMounter.IsMountedArgsForCall(0)).To(Equal("fake-device-path")) }) }) })