Updating PHPSpec plugin to work with v2. Fixes #339

This commit is contained in:
Dan Cryer 2014-04-16 10:23:04 +01:00
parent 257249fadd
commit ad38db47bd

View file

@ -21,15 +21,10 @@ use PHPCI\Model\Build;
class PhpSpec implements \PHPCI\Plugin
{
protected $phpci;
protected $bootstrap;
public function __construct(Builder $phpci, Build $build, array $options = array())
{
$this->phpci = $phpci;
if (!empty($options['bootstrap'])) {
$this->bootstrap = $this->buildPath . $options['bootstrap'];
}
}
/**
@ -47,11 +42,7 @@ class PhpSpec implements \PHPCI\Plugin
return false;
}
if ($this->bootstrap) {
$success = $this->phpci->executeCommand($phpspec . ' -f d');
} else {
$success = $this->phpci->executeCommand($phpspec . ' -f d --bootstrap "%s"', $this->bootstrap);
}
$success = $this->phpci->executeCommand($phpspec . ' --format=pretty --no-code-generation');
chdir($curdir);