public void ExpiresWhenFilesChange() { var viewFolder = new StubViewFolder { Path = Path.Combine("home", "changing.spark"), LastModified = 4 }; var viewLoader = new ViewLoader { ViewFolder = viewFolder, SyntaxProvider = MockRepository.GenerateStub<ISparkSyntaxProvider>() }; viewLoader.SyntaxProvider .Expect(x => x.GetChunks(null, null)) .IgnoreArguments() .Return(new Chunk[0]); viewLoader.Load(Path.Combine("home", "changing.spark")); Assert.That(viewLoader.IsCurrent()); viewFolder.LastModified = 7; Assert.That(!viewLoader.IsCurrent()); }