|
NAMETest::Able - xUnit with Moose VERSION0.10 SYNOPSIS package MyTest;
use Test::Able;
use Test::More;
startup some_startup => sub { ... };
setup some_setup => sub { ... };
test plan => 1, foo => sub { ok( 1 ); };
test bar => sub {
my @runtime_list = 1 .. 42;
$_[ 0 ]->meta->current_method->plan( scalar @runtime_list );
ok( 1 ) for @runtime_list;
};
teardown some_teardown => sub { ... };
shutdown some_shutdown => sub { ... };
MyTest->run_tests;
DESCRIPTIONAn xUnit style testing framework inspired by Test::Class and built using Moose. It can do all the important things Test::Class can do and more. The prime advantages of using this module instead of Test::Class are flexibility and power. Namely, Moose. This module was created for a few of reasons:
EXPORTED FUNCTIONSIn addition to exporting for Moose, Test::Able will export a handful of functions that can be used to declare test-related methods.
Overview1. Build some test classes: a, b, & c. The classes just have to be based on Test::Able. 2. Fire up an instance of any of them to be the runner object. Any test object can serve as the test_runner_object including itself. my $b_obj = b->new; 3. Setup the test_objects in the test_runner_object. $b_obj->test_objects( [
a->new,
$b_obj,
c->new,
] );
4. Do the test run. The test_objects will be run in order. $b_obj->run_tests; SEE ALSO
AUTHORJustin DeVuyst, "justin@devuyst.com" COPYRIGHT AND LICENSECopyright 2009 by Justin DeVuyst. This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
|