Getting Started¶
Project layout¶
A Behave project keeps spec files in a specs/ directory at the project root. The behave runner picks up any file matching spec.raku (e.g. 001-basic-spec.raku, users-spec.raku, subdir/admin-spec.raku).
1 2 3 4 5 6 7 | |
Your first spec¶
Every spec file starts with use BDD::Behave; and then declares one or more top-level describe blocks.
1 2 3 4 5 6 7 8 9 10 11 | |
Running specs¶
Run all specs found in specs/:
1 | |
Run a single spec file:
1 | |
During local development of an app whose lib/ is not yet installed, prefix with raku -Ilib:
1 | |
See Running Specs for the full set of options.
Where to go next¶
describe/context— group related examplesit— define an examplelet— lazy, memoized values per example- Hooks —
before-each,after-each,before-all,after-all - Shared Contexts — reusable
lets and hooks viashared-context/include-context expect— assertions