function it_dispatches_ExampleEvent_with_failed_status_if_example_throws_exception(EventDispatcherInterface $dispatcher, ExampleNode $example, ReflectionMethod $exampReflection, Specification $context)
{
$example->isPending()->willReturn(false);
$exampReflection->getParameters()->willReturn(array());
$exampReflection->invokeArgs($context, array())->willThrow('RuntimeException');
$dispatcher->dispatch('beforeExample', Argument::any())->shouldBeCalled();
$dispatcher->dispatch('afterExample', Argument::which('getResult', ExampleEvent::BROKEN))->shouldBeCalled();
$this->run($example);
}