PhpSpec\Listener\ClassNotFoundListener::afterSuite PHP Method

afterSuite() public method

public afterSuite ( SuiteEvent $event )
$event PhpSpec\Event\SuiteEvent
    public function afterSuite(SuiteEvent $event)
    {
        if (!$this->io->isCodeGenerationEnabled()) {
            return;
        }
        foreach ($this->classes as $classname => $_) {
            $message = sprintf('Do you want me to create `%s` for you?', $classname);
            try {
                $resource = $this->resources->createResource($classname);
            } catch (\RuntimeException $e) {
                continue;
            }
            if ($this->io->askConfirmation($message)) {
                $this->generator->generate($resource, 'class');
                $event->markAsWorthRerunning();
            }
        }
    }