use Task\Plugin\PhpSpecPlugin;
$project->inject(function ($container) {
$container['phpspec'] = new PhpSpecPlugin;
});
$project->addTask('test', ['phpspec', function ($phpspec) {
$phpspec->command('run')
->setConfig($this->getProperty('config', 'phpspec.yml'))
->setFormat('pretty')
->pipe($this->getOutput());
}]);
Add to your composer.json
:
...
"require-dev": {
"task/phpspec": "~0.1"
}
...
See task/console for usage documentation.