Hello!
Is it correct that a specification is run twice when included in another spec. via `concordion:run` or is it a mistake in my implementation?
I have these specs:
resources/math/
Algebra.md (contains
[Addition](./algebra/Addition.md "c:run"))
and when I run it I get this output:
...
file:///.../concordion/math/algebra/Addition.html
Successes: 2, Failures: 0
file:///.../concordion/math/algebra/Addition.html
Successes: 2, Failures: 0
file:///.../concordion/math/Algebra.html
Successes: 4, Failures: 0
Ran 2 tests containing 0 assertions.
0 failures, 0 errors.
As you can see, algebra.Addition is run twice, obviously once as a stand-alone specification and once via the run command. Is this the way it should be or not?
My implementation (adding support for clojure.test) is very simple, mostly replicating what Concordion JUnit 3 integration did:
- For each fixture class defined by the user (via deffixture), define a clojure.test test that calls my run-fixture (see below)
- The custom ClojureTestRunner finds a fixture class and also just invokes run-fixture (this time with suite? = false so that before/afterSuite is not run, which I understand is the expected behavior for linked specs)
- run-fixture itself is essentially copy-paste of integration.junit3.ConcordionTestCase, wrapping the fixture in a FixtureInstance and calling FixtureRunner.run - which goes through a results cache. So is there something wrong so that the results are not cached in my case - or are they actually cached but it does not show in the output?
Thank you!
Cheers, Jakub
PS: If you have any suggestions/critique regarding my implementation, I would really appreciate to hear that. (One is certainly I need to migrate to the new version of FixtureRunner.run that takes also "example".)