From: Dave Rolsky Date: Fri, 25 Dec 2009 16:04:12 +0000 (-0600) Subject: switch all tests to done_testing X-Git-Tag: 0.22~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e01c727755cd4ef07804f34803c4329248820f20;p=gitmo%2FMooseX-Singleton.git switch all tests to done_testing --- diff --git a/t/001-basic.t b/t/001-basic.t index cca73b0..cb53269 100644 --- a/t/001-basic.t +++ b/t/001-basic.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 17; +use Test::More; BEGIN { package MooseX::Singleton::Test; @@ -72,3 +72,5 @@ is( MooseX::Singleton::Test->distinct_keys, 0, "Package->clear works" ); MooseX::Singleton::Test->_clear_instance; $mst = $mst2 = undef; is( MooseX::Singleton::Test->instance->distinct_keys, 1, "back to the default" ); + +done_testing; diff --git a/t/002-init.t b/t/002-init.t index 0427694..bb1a548 100644 --- a/t/002-init.t +++ b/t/002-init.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More; use Test::Exception; my $i = 0; @@ -64,3 +64,5 @@ for my $pkg (new_singleton_pkg) { ok( Single->new, 'can call ->new without any args' ); ok( Single->instance, 'can call ->instance without any args' ); } + +done_testing; diff --git a/t/003-immutable.t b/t/003-immutable.t index 05ff974..618391e 100644 --- a/t/003-immutable.t +++ b/t/003-immutable.t @@ -5,12 +5,8 @@ use Scalar::Util qw( refaddr ); use Test::More; BEGIN { - unless ( eval 'use Test::Warn; 1' ) { - plan skip_all => 'These tests require Test::Warn'; - } - else { - plan tests => 18; - } + eval 'use Test::Warn'; + plan skip_all => 'These tests require Test::Warn' if $@; } { @@ -95,3 +91,5 @@ is( MooseX::Singleton::Test->distinct_keys, 0, "Package->clear works" ); 'singleton is not randomly destroyed' ); } + +done_testing; diff --git a/t/004-build_bug.t b/t/004-build_bug.t index a46c803..162786d 100644 --- a/t/004-build_bug.t +++ b/t/004-build_bug.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More 'no_plan'; +use Test::More; { package MySingleton; @@ -34,3 +34,5 @@ is( MySingleton->attrib, 'bar', 'BUILDARGS changed value of attrib when instance was explicitly instantiated' ); + +done_testing; diff --git a/t/005-build_bug-immutable.t b/t/005-build_bug-immutable.t index 4b6c1d3..7f7fd0a 100644 --- a/t/005-build_bug-immutable.t +++ b/t/005-build_bug-immutable.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More 'no_plan'; +use Test::More; { package MySingleton; @@ -36,3 +36,5 @@ is( MySingleton->attrib, 'bar', 'BUILDARGS changed value of attrib when instance was explicitly instantiated' ); + +done_testing; diff --git a/t/006-cooperative.t b/t/006-cooperative.t index ccc2695..4a52662 100644 --- a/t/006-cooperative.t +++ b/t/006-cooperative.t @@ -4,14 +4,12 @@ use warnings; use Test::More; BEGIN { - eval "require MooseX::StrictConstructor; use Test::Exception; 1;"; + eval "require MooseX::StrictConstructor; use Test::Exception;"; plan skip_all => 'This test requires MooseX::StrictConstructor and Test::Exception' if $@; } -plan 'no_plan'; - { package MySingleton; use Moose; @@ -25,3 +23,5 @@ throws_ok { MySingleton->new( bad_name => 42 ); } qr/Found unknown attribute/, 'singleton class also has a strict constructor'; + +done_testing;