Updating PHPSpec plugin to work with v2. Fixes #339
This commit is contained in:
parent
257249fadd
commit
ad38db47bd
|
@ -21,15 +21,10 @@ use PHPCI\Model\Build;
|
||||||
class PhpSpec implements \PHPCI\Plugin
|
class PhpSpec implements \PHPCI\Plugin
|
||||||
{
|
{
|
||||||
protected $phpci;
|
protected $phpci;
|
||||||
protected $bootstrap;
|
|
||||||
|
|
||||||
public function __construct(Builder $phpci, Build $build, array $options = array())
|
public function __construct(Builder $phpci, Build $build, array $options = array())
|
||||||
{
|
{
|
||||||
$this->phpci = $phpci;
|
$this->phpci = $phpci;
|
||||||
|
|
||||||
if (!empty($options['bootstrap'])) {
|
|
||||||
$this->bootstrap = $this->buildPath . $options['bootstrap'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,11 +42,7 @@ class PhpSpec implements \PHPCI\Plugin
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->bootstrap) {
|
$success = $this->phpci->executeCommand($phpspec . ' --format=pretty --no-code-generation');
|
||||||
$success = $this->phpci->executeCommand($phpspec . ' -f d');
|
|
||||||
} else {
|
|
||||||
$success = $this->phpci->executeCommand($phpspec . ' -f d --bootstrap "%s"', $this->bootstrap);
|
|
||||||
}
|
|
||||||
|
|
||||||
chdir($curdir);
|
chdir($curdir);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue