Concordion > Commands > Example >

Field initialisation in fixtures with examples

When running a specification with examples, a new fixture object is created for each example, including the outer (anonymous) example, if there is one.

Since this part of the specification is in the outer example (ie. outside of the named examples), the instance fields should have been created 1 time.

A before method shouldn't affect anything

Since this part of the specification is in the first example, the instance fields should have been created 2 times.

Since this part of the specification is in the second example, the instance fields should have been created 3 times.

Since this part of the specification is in the outer example, it is executed before the named examples above, the instance fields should have been created 1 time.