Test::Class::Moose::Config - Configuration information for Test::Class::Moose
version 0.97
my $tc_config = Test::Class::Moose::Config->new({ show_timing => 1, statistics => 1, randomize => 0, }); my $test_suite = Test::Class::Moose->new($tc_config);
For internal use only (maybe I'll expose it later). Not guaranteed to be stable.
This class defines many of the attributes for Test::Class::Moose. They're kept here to minimize namespace pollution in Test::Class::Moose.
show_timing
Boolean. Will display verbose information on the amount of time it takes each test class/test method to run.
statistics
Boolean. Will display number of classes, test methods and tests run.
use_environment
Boolean. Sets show_timing and statistics to true if your test harness is running verbosely, false otherwise.
test_classes
Takes a class name or an array reference of class names. If it is present, the test_classes method will only return these classes. This is very useful if you wish to run an individual class as a test:
Test::Class::Moose->new( test_classes => $ENV{TEST_CLASS}, # ignored if undef )->runtests;
include_tags
Array ref of strings matching method tags (a single string is also ok). If present, only test methods whose tags match include_tags or whose tags don't match exclude_tags will be included. However, they must still start with test_.
exclude_tags
test_
For example:
my $test_suite = Test::Class::Moose->new({ include_tags => [qw/api database/], });
The above constructor will only run tests tagged with api or database.
api
database
The same as include_tags, but will exclude the tests rather than include them. For example, if your network is down:
my $test_suite = Test::Class::Moose->new({ exclude_tags => [ 'network' ], }); # or my $test_suite = Test::Class::Moose->new({ exclude_tags => 'network', });
randomize
Boolean. Will run test methods of a class in a random order.
randomize_classes
Boolean. Will run test classes in a random order.
args
Returns a hash of the args used to build the configuration. This used to be used internally, but is now retained simply for backwards compatibility. You probably won't need it.
Bugs may be submitted at https://github.com/houseabsolute/test-class-moose/issues.
I am also usually active on IRC as 'autarch' on irc://irc.perl.org.
irc://irc.perl.org
The source code repository for Test-Class-Moose can be found at https://github.com/houseabsolute/test-class-moose.
Curtis "Ovid" Poe <ovid@cpan.org>
Dave Rolsky <autarch@urth.org>
This software is copyright (c) 2012 - 2019 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.
The full text of the license can be found in the LICENSE file included with this distribution.
To install Test::Class::Moose, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Class::Moose
CPAN shell
perl -MCPAN -e shell install Test::Class::Moose
For more information on module installation, please visit the detailed CPAN module installation guide.