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