index
BDD::Behave
The project URL for BDD::Behave is https://github.com/gdonald/BDD-Behave.
The latest version of this documentation lives at https://docs.behave.dev.
The homepage for BDD::Behave is https://behave.dev.
Synopsis
BDD::Behave is a behavior-driven development framework for Raku. Specs are ordinary Raku files that use BDD::Behave; and call exported DSL helpers (describe, context, it, let, before-each, expect, ā¦) to build and run a tree of examples.
Currently developed against Raku v6.d.
Example Usage
specs/001-spec.raku
use BDD::Behave;
describe 'this spec', {
let(:answer, { 42 });
it 'passes', {
expect(answer).to.be(42);
}
}
describe 'this final spec', {
let(:answer, { 42 });
it 'fails at line 15', {
expect(answer).to.be(41);
}
}Run it with the behave runner:
$ behave specs/001-spec.rakuOutput:
ā® 'this spec'
ā® 'passes'
ā® SUCCESS
ā® 'this final spec'
ā® 'fails at line 15'
ā® FAILURE
Failures:
[ ā ] specs/001-spec.raku:15
Expected: 42
to be: 41
2 examples, 1 failed, 1 passedInstall
BDD::Behave can be installed using the zef module installation tool:
zef install BDD::Behave