gdonald / BDD-Behave

A behavior driven development framework for Raku

Home Page:https://gregdonald.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Behave

A behavior driven development framework written in Raku.

Currently developed against Raku v6.d.

Install using zef

zef install BDD::Behave

Running Behave:

If a file is not specified Behave will automatically look for a specs directory and will run anything matching /spec.raku/.

An example:

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

Status

.github/workflows/raku.yml

Documentation

See the examples in specs/*.

License

Behave is released under the Artistic License 2.0

About

A behavior driven development framework for Raku

https://gregdonald.com

License:Artistic License 2.0


Languages

Language:Raku 100.0%