logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Fennec::Finder - Create one .t file to find all .pm test files.

Authors

       Chad Granum exodist7@gmail.com

Customisations

SEARCHPATHS
       When you "use Fennec::Finder;" the './t/' directory will be searched if it exists, otherwise the './'
       directory will be used. You may optionally provide alternate paths at use time: "use Fennec::Finder
       './Fennec', './SomeDir';"

           #!/usr/bin/perl
           use strict;
           use warnings;

           use Fennec::Finder './Fennec', './SomeDir';

           run();

   FILEVALIDATION
       If you wish to customize which files are loaded you may subclass Fennec::Finder and override the
       "validate_file( $file )" method. This method takes the filename to verify as an argument. Return true if
       the file should be loaded, false if it should not. Currently the only check is that the filename ends
       with a ".pm".

Description

       Originally Fennec made use of a runner loaded in t/Fennec.t that sought out test files (modules) to run.
       This modules provides similar, but greatly simplified functionality.

Name

       Fennec::Finder - Create one .t file to find all .pm test files.

Synopsis

       Fennec.t:

           #!/usr/bin/perl
           use strict;
           use warnings;

           use Fennec::Finder;

           run();

       This will find all .pm and .ft files under t/ and load them. Any that contain Fennec tests will register
       themselves to be run once run() is called.

       Warning,ifyouhave.pmfilesint/thatarenotteststheywillalsobeloaded,ifanyofthesehaveinteractionswiththepackagesyouaretestingyoumustaccountforthem.

See Also