Skip to content

Commit

Permalink
Changed tests to use done_testing() rather than pre-counted tests.
Browse files Browse the repository at this point in the history
The skips are causing lots of test failures.  Perhaps there is a more
elegant way to handle this,but this should tide us over until a
more suitable fix is applied.
  • Loading branch information
mstratman committed Apr 11, 2012
1 parent fc1e4d2 commit 22dc156
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 2 additions & 7 deletions t/01.methods.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use Test::More tests => 22;
use Test::More;
use lib '../lib';

BEGIN {
Expand All @@ -7,12 +7,6 @@ BEGIN {

diag( "Testing DateTime::Format::Human::Duration $DateTime::Format::Human::Duration::VERSION" );

# plan skip_all => 'DateTime required for creating DateTime object and durations' if $@;
# That fails under Test::More 0.70 like so:
# You tried to plan twice at t/01.methods.t line 11.
# Looks like you planned 22 tests but only ran 1.
# Looks like your test died just after 1.

SKIP: {
eval 'use DateTime';
skip 'DateTime required for creating DateTime object and durations', 22 if $@;
Expand Down Expand Up @@ -67,3 +61,4 @@ SKIP: {

};

done_testing();
6 changes: 4 additions & 2 deletions t/pod-coverage.t
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!perl -T

use Test::More 'tests' => 1;
use Test::More;
eval 'use Test::Pod::Coverage 1.04';
plan skip_all => 'Test::Pod::Coverage 1.04 required for testing POD coverage' if $@;

Test::Pod::Coverage::pod_coverage_ok( "DateTime::Format::Human::Duration", { 'trustme' => [qr/^(new)$/,], } );

# Locale.pm, es.pm, and fr.pm don;t have POD
# all_pod_coverage_ok();
# all_pod_coverage_ok();

done_testing();

0 comments on commit 22dc156

Please sign in to comment.