function it_should_not_dispatch_an_event_if_the_file_was_not_created($dispatcher, $filesystem, Resource $resource)
{
$path = '/foo';
$resource->getSrcFilename()->willReturn($path);
$filesystem->pathExists($path)->willReturn(false);
$this->generate($resource, array());
$dispatcher->dispatch('afterFileCreation', Argument::any())->shouldNotHaveBeenCalled();
}