function it_should_check_that_the_file_was_created($generator, $filesystem, Resource $resource)
{
$path = '/foo';
$resource->getSrcFilename()->willReturn($path);
$filesystem->pathExists($path)->willReturn(false);
$generator->supports(Argument::cetera())->willReturn(false);
$generator->generate($resource, array())->will(function () use($filesystem, $path) {
$filesystem->pathExists($path)->willReturn(true);
});
$this->generate($resource, array());
}