From: Peter Rabbitson Date: Thu, 3 Jun 2010 09:23:08 +0000 (+0000) Subject: Convert all no_plan tests to done_testing X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=89bddb490d9a159ebf4e08ec99e5651d76ec5ad4;p=dbsrgits%2FDBIx-Class-Historic.git Convert all no_plan tests to done_testing --- diff --git a/t/67pager.t b/t/67pager.t index 6a6aabc..b017afb 100644 --- a/t/67pager.t +++ b/t/67pager.t @@ -1,7 +1,7 @@ use strict; -use warnings; +use warnings; -use Test::More qw(no_plan); +use Test::More; use lib qw(t/lib); use DBICTest; @@ -100,3 +100,5 @@ my $row = $schema->resultset('CD')->search({}, { })->single; is($row->cdid, $it->first->cdid, 'page with offset'); + +done_testing; diff --git a/t/96_is_deteministic_value.t b/t/96_is_deteministic_value.t index 9f75f4d..b6ca886 100644 --- a/t/96_is_deteministic_value.t +++ b/t/96_is_deteministic_value.t @@ -9,7 +9,6 @@ use DBICTest; plan skip_all => "DateTime required" unless eval { require DateTime }; eval "use DateTime::Format::Strptime"; plan skip_all => 'DateTime::Format::Strptime required' if $@; -plan 'no_plan'; use Test::Exception; my $schema = DBICTest->init_schema(); @@ -63,5 +62,4 @@ my $cd_rs = $schema->resultset('CD'); is($artist->name, undef); } - -1; +done_testing; diff --git a/t/cdbi/columns_as_hashes.t b/t/cdbi/columns_as_hashes.t index 78066b2..6a9b1bc 100644 --- a/t/cdbi/columns_as_hashes.t +++ b/t/cdbi/columns_as_hashes.t @@ -4,8 +4,7 @@ use Test::Warn; BEGIN { eval "use DBIx::Class::CDBICompat;"; - plan $@ ? (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@") - : ('no_plan'); + plan skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@" if $@; } use lib 't/cdbi/testlib'; @@ -101,4 +100,6 @@ SKIP: { isa_ok $foo->{tdate}, 'Date::Simple'; is $foo->{tdate}->year, 1949; -} \ No newline at end of file +} + +done_testing; diff --git a/t/cdbi/early_column_heisenbug.t b/t/cdbi/early_column_heisenbug.t index 09ea6d9..e6157d0 100644 --- a/t/cdbi/early_column_heisenbug.t +++ b/t/cdbi/early_column_heisenbug.t @@ -4,8 +4,7 @@ use Test::More; BEGIN { eval "use DBIx::Class::CDBICompat;"; - plan $@ ? (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@") - : ('no_plan'); + plan skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@" if $@; } @@ -25,4 +24,4 @@ is_deeply [Stuff->columns("Essential")], []; Thing->columns(Essential => qw(foo bar baz)); is_deeply [Stuff->columns("Essential")], []; -1; +done_testing; diff --git a/t/cdbi/mk_group_accessors.t b/t/cdbi/mk_group_accessors.t index 7c5ce67..debd8d5 100644 --- a/t/cdbi/mk_group_accessors.t +++ b/t/cdbi/mk_group_accessors.t @@ -7,8 +7,6 @@ BEGIN { eval "use DBD::SQLite"; plan skip_all => 'needs DBD::SQLite for testing' if $@; - - plan 'no_plan'; } INIT { @@ -67,3 +65,5 @@ sub Film::mutator_name_for { $film->wibble_thing(23); is $film->wibble_thing, 23; } + +done_testing; diff --git a/t/multi_create/cd_single.t b/t/multi_create/cd_single.t index 5f2f568..4d213c7 100644 --- a/t/multi_create/cd_single.t +++ b/t/multi_create/cd_single.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More qw(no_plan); +use Test::More; use Test::Exception; use lib qw(t/lib); use DBICTest; @@ -32,3 +32,5 @@ eval { ok($single->cdid, 'Got cdid'); }; + +done_testing; diff --git a/t/multi_create/reentrance_count.t b/t/multi_create/reentrance_count.t index 0c0dca8..c4649ed 100644 --- a/t/multi_create/reentrance_count.t +++ b/t/multi_create/reentrance_count.t @@ -6,8 +6,6 @@ use Test::Exception; use lib qw(t/lib); use DBICTest; -plan 'no_plan'; - my $schema = DBICTest->init_schema(); my $query_stats; @@ -177,4 +175,4 @@ lives_ok (sub { } -1; +done_testing;