I'm developing a HTTP server and for the first time I've decided to write the tests specs with PHPSpec, which is great.
I have two spec classes: spec\AppSpec
and spec\RequestParserSpec
.
Since the App
is the interface between the server components and the outer world, it uses the RequestParser
to parse the requests. So, in order to get the specs in AppSpec
passing, the RequestParserSpec
has to be ran before to check if the request parsing is working fine.
Here is the problem : $ phpspec run
runs before AppSpec
and then RequestParserSpec
.
Is it possible to inverse that order? Presently, if RequestParser
has a problem, AppSpec
will fail without telling what's the root problem.
Yes, I know I can do phpspec run tests/spec/RequestParserSpec.php
, then the others, but it would be more practical if this could be automated to run the tests in one pass.
suites:
myapp_suite:
namespace: MyApp
psr4_prefix: MyApp
spec_path: tests