Help language development. Donate to The Perl Foundation

Test::Describe zef:FCO last updated on 2022-04-29

3164e55e7bee3e5f0fd091a71b3bb8a0f5df8b2d/

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 <[email protected]>

COPYRIGHT AND LICENSE

Copyright 2021

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