NAME
Test::Class::Moose::Role - Test::Class::Moose for roles
VERSION
version 0.50
DESCRIPTION
If you need the functionality of Test::Class::Moose to be available inside of a role, this is the module to do that. This is how you can declare a TCM role:
package
TestsFor::Basic::Role;
sub
test_in_a_role {
my
$test
=
shift
;
pass
"This is picked up from role"
;
}
sub
in_a_role_with_tags : Tags(first){
fail
"We should never see this test"
;
}
sub
test_in_a_role_with_tags : Tags(second){
pass
"We should see this test"
;
}
1;
And to consume it:
Note that this cannot be consumed into classes and magically make them into test classes. You must still (at the present time) inherit from Test::Class::Moose
to create a test suite.
AUTHOR
Curtis "Ovid" Poe <ovid@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Curtis "Ovid" Poe.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.