A behavior driven development framework written in Raku.
Currently developed against Raku v6.d
.
zef install BDD::Behave
If a file is not specified Behave will automatically look for a specs
directory and will run anything matching /spec.raku/
.
specs/001-spec.raku
use BDD::Behave;
describe -> 'this spec' {
it -> 'passes' {
expect(42).to.be(42);
}
}
describe -> 'this final spec' {
it -> 'fails at line 12' {
expect(42).to.be(41);
}
}
You can run the spec like this:
$ behave specs/001-spec.raku
Output:
specs/001-spec.raku
⮑ 'this spec'
⮑ 'passes'
⮑ SUCCESS
⮑ 'this final spec'
⮑ 'fails at line 12'
⮑ FAILURE
Failures:
[ ✗ ] specs/001-spec.raku:12
See the examples in specs/*.
Behave is released under the Artistic License 2.0