Name : perl-Test-Roo
| |
Version : 1.004
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 1.72
| Date : 2024-08-05 17:53:06
|
Group : Development/Libraries/Perl
| Source RPM : perl-Test-Roo-1.004-1.72.src.rpm
|
Size : 0.08 MB
| |
Packager : (none)
| |
Summary : Composable, reusable tests with roles and Moo
|
Description :
This module allows you to compose the Test::More manpage tests from roles. It is inspired by the excellent the Test::Routine manpage module, but uses the Moo manpage instead of the Moose manpage. This gives most of the benefits without the need for the Moose manpage as a test dependency.
Test files are Moo classes. You can define any needed test fixtures as Moo attributes. You define tests as method modifiers -- similar in concept to \'subtest\' in the Test::More manpage, but your test method will be passed the test object for access to fixture attributes. You may compose any the Moo::Role manpage into your test to define attributes, require particular methods, or define tests.
This means that you can isolate test _behaviors_ into roles which require certain test _fixtures_ in order to run. Your main test file will provide the fixtures and compose the roles to run. This makes it easy to reuse test behaviors.
For example, if you are creating tests for Awesome::Module, you could create the test behaviors as Awesome::Module::Test::Role and distribute it with your module. If another distribution subclasses Awesome::Module, it can compose the Awesome::Module::Test::Role behavior for its own tests.
No more copying and pasting tests from a super class! Superclasses define and share their tests. Subclasses provide their own fixtures and run the tests.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-T/openSUSE_Tumbleweed/noarch |