What will my generated test class be called, and which package does it land in? #10
|
I can't work out what decides the generated class's name — the class I put |
Replies: 1 comment
|
Both come from the spec file itself — not from the class you put the annotation on. The name is the spec file's own name, without its extension, plus a suffix: The suffix is This is the same however you point SpecBinder at your specs — one exact path, or letting it find The package is the folder the spec file sits in, read as a package path:
So a class sitting in On disk the generated file appears under One thing worth knowing up front: because the name follows the file, renaming a spec file |
Both come from the spec file itself — not from the class you put the annotation on.
The name is the spec file's own name, without its extension, plus a suffix:
The suffix is
Scenariosby default. In concrete mode it'sTestinstead. Both areconfigurable.
This is the same however you point SpecBinder at your specs — one exact path, or letting it find
several for you. A class named
ShoppingCartFeaturepointing atShoppingCart.specbstillproduces
ShoppingCartScenarios, notShoppingCartFeatureScenarios.The package is the folder the spec file sits in, read as a package path:
specs/ShoppingCart.specbspecs.…