Rand Stats

Test::Describe

zef:FCO

Actions Status

NAME

Test::Describe - blah blah blah

SYNOPSIS

use Test::Describe;

describe Int, {
    context "should have some methods", {
        define "is-prime-example", 42;
        define "a-code", 97;

        it "should have a working is-prime", -> :$described-class, :$is-prime-example {
            expect($described-class).to: have-method "is-prime";
            expect($is-prime-example).to: be-false;
        }

        it "should have a working is-prime", -> :$described-class, :$a-code {
            expect($described-class).to: have-method "is-prime";
            expect($a-code.chr).to: be-false;
        }
    }

    context "should work with math operators", {
        define "one-plus-one", { 1 + 1 };

        it "sum", -> :&one-plus-one {
            expect(one-plus-one).to: be-eq 2
        }
    }
}

DESCRIPTION

Test::Describe is a RSpec like testing for Raku

AUTHOR

Fernando Correa de Oliveira <fernandocorrea@gmail.com>

COPYRIGHT AND LICENSE

Copyright 2021

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.