From: Karen Etheridge Date: Sat, 14 Sep 2013 15:47:40 +0000 (-0700) Subject: do not let warnings kill an install X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0f01d3ff6b0a1edc7ff0d119827286597bef4d5c;p=gitmo%2FMooseX-ConfigFromFile.git do not let warnings kill an install --- diff --git a/Changes b/Changes index d71a07c..963cfe4 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ Revision history for {{$dist->name}} {{$NEXT}} + - warnings tests bypassed during installation 0.11 2013-06-23 09:22:04 PDT-0700 (Karen Etheridge) - bump prereq version for MooseX::Types::Path::Tiny to ensure a diff --git a/t/01use.t b/t/01use.t index 5d6915f..15315d5 100644 --- a/t/01use.t +++ b/t/01use.t @@ -1,9 +1,11 @@ use strict; use warnings FATAL => 'all'; -use Test::More tests => 2; -use Test::Warnings; +use Test::More; +use if $ENV{AUTHOR_TESTING}, 'Test::Warnings'; BEGIN { use_ok('MooseX::ConfigFromFile'); } + +done_testing; diff --git a/t/02subclass.t b/t/02subclass.t index 109bc0b..cf31181 100644 --- a/t/02subclass.t +++ b/t/02subclass.t @@ -1,9 +1,9 @@ use strict; use warnings FATAL => 'all'; -use Test::More tests => 3; +use Test::More; use Test::Fatal; -use Test::Warnings; +use if $ENV{AUTHOR_TESTING}, 'Test::Warnings'; { package A; @@ -22,3 +22,4 @@ use Test::Warnings; ok(B->does('MooseX::ConfigFromFile'), 'B does ConfigFromFile'); is(exception { B->new_with_config() }, undef, 'B->new_with_config lives'); +done_testing; diff --git a/t/03configfile_method.t b/t/03configfile_method.t index 0faccc3..8c2911e 100644 --- a/t/03configfile_method.t +++ b/t/03configfile_method.t @@ -1,8 +1,8 @@ use strict; use warnings FATAL => 'all'; -use Test::More tests => 7; -use Test::Warnings; +use Test::More; +use if $ENV{AUTHOR_TESTING}, 'Test::Warnings'; use Test::Fatal; my %config_from_file_args; @@ -54,3 +54,4 @@ is($config_from_file_args{B}, 'bar', 'B configfile attr default sub is called'); is(exception { C->new_with_config() }, undef, 'C->new_with_config lives'); is($config_from_file_args{C}, '/dir/C', 'C configfile attr default sub is called, with classname'); +done_testing; diff --git a/t/04a_getopt.t b/t/04a_getopt.t index 562c54f..0ba26ec 100644 --- a/t/04a_getopt.t +++ b/t/04a_getopt.t @@ -1,8 +1,8 @@ use strict; use warnings FATAL => 'all'; -use Test::More tests => 2; -use Test::Warnings; +use Test::More; +use if $ENV{AUTHOR_TESTING}, 'Test::Warnings'; use Test::Without::Module 'MooseX::Getopt'; @@ -19,3 +19,4 @@ ok( 'the Getopt attr trait is not added if not installed', ); +done_testing; diff --git a/t/04b_getopt.t b/t/04b_getopt.t index 4ba5d5b..952e1ca 100644 --- a/t/04b_getopt.t +++ b/t/04b_getopt.t @@ -2,8 +2,8 @@ use strict; use warnings FATAL => 'all'; use Test::Requires 'MooseX::Getopt'; # skip all if not installed -use Test::More tests => 3; -use Test::Warnings; +use Test::More; +use if $ENV{AUTHOR_TESTING}, 'Test::Warnings'; { package Foo::Options; @@ -31,3 +31,4 @@ ok( 'when MooseX::Getopt is loaded, the Getopt attr trait is still added', ); +done_testing; diff --git a/t/05_default_sub.t b/t/05_default_sub.t index 7c19421..bdcb495 100644 --- a/t/05_default_sub.t +++ b/t/05_default_sub.t @@ -1,10 +1,10 @@ use strict; use warnings FATAL => 'all'; -use Test::More tests => 49; +use Test::More; use Test::Fatal; use Test::Deep '!blessed'; -use Test::Warnings; +use if $ENV{AUTHOR_TESTING}, 'Test::Warnings'; use Scalar::Util 'blessed'; my %loaded_file; @@ -359,3 +359,4 @@ is( 'no exceptions', ); +done_testing;