From: Karen Etheridge Date: Wed, 26 Dec 2012 18:07:49 +0000 (-0800) Subject: Test::Requires must come before Test::NoWarnings X-Git-Tag: v0.49~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=44f514c7b7f403894b44d3b8ce7da3254cd40928;p=gitmo%2FMooseX-Getopt.git Test::Requires must come before Test::NoWarnings --- diff --git a/Changes b/Changes index d3af2fe..29d6840 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ Revision history for Perl extension MooseX-Getopt {{$NEXT}} - silence a warning in tests if the user does not have YAML::XS installed (thanks for the report, Getty!) + - fix off-by-one issues in test plans if optional requirements are not met 0.48 2012-12-23 18:08:04 PST-0800 - documentation and tests amended to prefer usage of 'trait' over 'metaclass' diff --git a/t/008_configfromfile.t b/t/008_configfromfile.t index c40fcc6..9a490e5 100644 --- a/t/008_configfromfile.t +++ b/t/008_configfromfile.t @@ -1,13 +1,12 @@ use strict; use warnings; +use Test::Requires 'MooseX::ConfigFromFile'; # skip all if not installed use Test::More tests => 38; use Test::Fatal; use File::Spec; use Test::NoWarnings 1.04 ':early'; -use Test::Requires 'MooseX::ConfigFromFile'; - { package App; diff --git a/t/107_no_auto_help.t b/t/107_no_auto_help.t index e2064c7..638f1a5 100644 --- a/t/107_no_auto_help.t +++ b/t/107_no_auto_help.t @@ -11,11 +11,11 @@ use strict; use warnings; +use Test::Requires { 'MooseX::SimpleConfig' => 0.07 }; # skip all if not installed use Test::More tests => 2; +use Test::Warn 0.21; +use Test::Fatal 0.003; -use Test::Requires { - 'MooseX::SimpleConfig' => 0.07, # skip all if not installed -}; use Test::NoWarnings 1.04 ':early'; my $fail_on_exit = 1; @@ -43,9 +43,6 @@ my $fail_on_exit = 1; 1; } -use Test::Warn 0.21; -use Test::Fatal 0.003; - END { ok(!$fail_on_exit, 'getoptions() lives'); diff --git a/t/112_configfile_constructor_arg.t b/t/112_configfile_constructor_arg.t index 8cb1381..68455b9 100644 --- a/t/112_configfile_constructor_arg.t +++ b/t/112_configfile_constructor_arg.t @@ -1,11 +1,9 @@ use strict; use warnings; -use Test::Requires - 'MooseX::SimpleConfig'; # skip all if not installed - # respect the configfile value passed into the constructor. +use Test::Requires 'MooseX::SimpleConfig'; # skip all if not installed use Test::More tests => 3; use Test::NoWarnings 1.04 ':early'; use Path::Class; # exports file, dir