public bool Write(AssetPath asset, Action <IEnumerable <AssetFile> > writeHeaders)
        {
            if (asset.IsBinary())
            {
                return(writeBinary(asset, writeHeaders).Any());
            }

            // TODO -- have to deal with the [package]:scripts/
            // think it'll just be testing
            return(writeTextualAsset(asset, writeHeaders).Any());
        }
        protected override void beforeEach()
        {
            _files       = null;
            theAssetPath = new AssetPath("images/icon.gif");

            // Precondition here
            theAssetPath.IsBinary().ShouldBeTrue();

            theFile = new AssetFile(theAssetPath.ToFullName())
            {
                FullPath = theAssetPath.ToFullName().ToFullPath()
            };

            MockFor <IAssetFileGraph>().Stub(x => x.Find(theAssetPath))
            .Return(theFile);

            theAction = files => _files = files;

            wasWritten = ClassUnderTest.Write(theAssetPath, theAction);
        }
        protected override void beforeEach()
        {
            var assetPath = new AssetPath("scripts/combo1.js");

            assetPath.IsBinary().ShouldBeFalse();

            theFiles = new AssetFile[] {
                new AssetFile("script1.js")
                {
                    FullPath = "1.js"
                },
                new AssetFile("script2.js")
                {
                    FullPath = "2.js"
                },
                new AssetFile("script3.js")
                {
                    FullPath = "3.js"
                },
                new AssetFile("script4.js")
                {
                    FullPath = "4.js"
                },
            };

            MockFor <IContentPlanCache>().Stub(x => x.SourceFor(assetPath))
            .Return(MockFor <IContentSource>());

            MockFor <IContentSource>().Expect(x => x.GetContent(MockFor <IContentPipeline>()))
            .Return(theContent);

            MockFor <IContentSource>().Stub(x => x.Files).Return(theFiles);

            theAction = files => _files = files;

            wasReturned = ClassUnderTest.Write(assetPath, theAction);
        }