Test::Workflow::Meta - The meta-object added to all Test-Workflow test classes.


Fennec documentation Contained in the Fennec distribution.

Index


Code Index:

NAME

Top

Test::Workflow::Meta - The meta-object added to all Test-Workflow test classes.

DESCRIPTION

Top

When you use Test::Workflow; a function is added to you class named 'TEST_WORKFLOW' that returns the single Test-Workflow meta-object that tracks information about your class.

AUTHORS

Top

Chad Granum exodist7@gmail.com

COPYRIGHT

Top


Fennec documentation Contained in the Fennec distribution.

package Test::Workflow::Meta;
use strict;
use warnings;

use Test::Workflow::Layer;
use Test::Builder;

use Fennec::Util qw/accessors/;

accessors qw/
    test_class build_complete root_layer test_run test_sort
    ok diag skip todo_start todo_end
/;

sub new {
    my $class = shift;
    my ( $test_class ) = @_;

    my $tb = "tb";
    #$tb = "tb2" if eval { require Test::Builder2; 1 };

    my $self = bless({
        test_class => $test_class,
        root_layer => Test::Workflow::Layer->new(),
        ok         => Fennec::Util->can( "${tb}_ok"         ),
        diag       => Fennec::Util->can( "${tb}_diag"       ),
        skip       => Fennec::Util->can( "${tb}_skip"       ),
        todo_start => Fennec::Util->can( "${tb}_todo_start" ),
        todo_end   => Fennec::Util->can( "${tb}_todo_end"   ),
    }, $class );

    return $self;
}

1;

__END__