我有一个像下面这样的phpspec类,我只想从中运行一个规范。我想只运行“it_should_do_something_easy”。这可能吗?
这是我运行此spec文件的方式:
$> phpspec run spec/Project/WorkerSpec.php
但现在我只想运行一个像“it_should_do_something_easy”这样的规范。
<?php
namespace spec\Project;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
class WorkerSpec
{
public function it_should_do_something_easy()
{
$this->doSomethingEasy()->shouldReturn('Done!');
}
public function it_should_do_something_hard()
{
$this->doSomethingHard()->shouldReturn('Too hard!');
}
}
答案 0 :(得分:16)
指定定义示例方法的行号:
<div id="element" ng-switch on="user.type">
<span ng-switch-when="basic"><basic></basic></span>
<span ng-switch-when="regular"><regular></regular></span>
<span ng-switch-when="advance"><advance></advance></span>
</div>