Test::More::Strict - Enforce policies on test results


Test-More-Strict documentation  | view source Contained in the Test-More-Strict distribution.

Index


NAME

Top

Test::More::Strict - Enforce policies on test results

VERSION

Top

This document describes Test::More::Strict version 0.02

SYNOPSIS

Top

    # Enforce non-blank test description
    use Test::More::Strict description => sub {
        my $desc = shift;
        return defined $desc and $desc =~ /\S/;
    };

DESCRIPTION

Top

Test::More::Strict allows policies for test results to be enforced. For example you may require that all tests have a non-blank description. You could achieve that like this:

    # Enforce non-blank test description
    use Test::More::Strict description => sub {
        my $desc = shift;
        return defined $desc and $desc =~ /\S/;
    };

In general you pass a number of key => coderef pairs on the use line. Currently the only recognised key is description. The coderef is called with the test description as its first argument. It should return a true value if the description is OK otherwise false.

INTERFACE

Top

caller

Overridden from Test::Builder. Adjusts the stack depth to account for our intercept.

ok

Overridden from Test::Builder.

CONFIGURATION AND ENVIRONMENT

Top

Test::More::Strict requires no configuration files or environment variables.

DEPENDENCIES

Top

None.

INCOMPATIBILITIES

Top

None reported.

BUGS AND LIMITATIONS

Top

No bugs have been reported.

Please report any bugs or feature requests to bug-test-more-strict@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR

Top

Andy Armstrong <andy.armstrong@messagesystems.com>

LICENCE AND COPYRIGHT

Top


Test-More-Strict documentation  | view source Contained in the Test-More-Strict distribution.