Permalink
Browse files

Switch tests to use done_testing

  • Loading branch information...
1 parent ae01660 commit 0d967db0f1cff0a2f4dc0eefc969d295725a1682 @gshank committed Aug 12, 2009
Showing with 45 additions and 35 deletions.
  1. +2 −2 t/01app.t
  2. +2 −2 t/compound_field.t
  3. +3 −1 t/constraints.t
  4. +2 −2 t/dependency.t
  5. +2 −2 t/errors.t
  6. +2 −1 t/field_custom_attr.t
  7. +1 −6 t/filters.t
  8. +2 −2 t/form_handler.t
  9. +4 −2 t/form_options.t
  10. +3 −1 t/has_field.t
  11. +2 −1 t/has_many.t
  12. +2 −2 t/inactive_fields.t
  13. +2 −1 t/list.t
  14. +2 −1 t/password.t
  15. +5 −1 t/render.t
  16. +4 −2 t/render_table.t
  17. +3 −1 t/structured.t
  18. +2 −5 t/types.t
View
@@ -1,4 +1,4 @@
-use Test::More tests => 7;
+use Test::More;
use_ok( 'HTML::FormHandler::Model' );
use_ok( 'HTML::FormHandler' );
@@ -9,4 +9,4 @@ use_ok( 'HTML::FormHandler::Field::Repeatable' );
use_ok( 'HTML::FormHandler::Model::CDBI' );
-
+done_testing;
View
@@ -1,4 +1,4 @@
-use Test::More tests => 20;
+use Test::More;
use lib 't/lib';
@@ -108,4 +108,4 @@ is_deeply( $form->fif, $params, 'get fif from compound field' );
$form->process( params => { 'compound.aaa' => undef } );
ok( !$form->field( 'compound' )->has_errors, 'Not required copound with empty sub values is not checked');
-
+done_testing;
View
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use Test::More tests => 12;
+use Test::More;
use lib 't/lib';
{
@@ -106,3 +106,5 @@ is( $message, "This number (10) is not less than ten!", 'type constraint - error
ok( !$form->field('less_than_ten_pass')->has_errors, 'type constraint - pass' );
#warn Dumper( $form ); use Data::Dumper;
is_deeply( $form->fif, $params, 'fif is correct');
+
+done_testing;
View
@@ -1,4 +1,4 @@
-use Test::More tests => 6;
+use Test::More;
use DateTime;
@@ -49,4 +49,4 @@ foreach my $field (@error_fields)
is( $field->errors->[0], $field->label . ' field is required', "required field: $name");
}
-
+done_testing;
View
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use Test::More tests => 16;
+use Test::More;
use_ok( 'HTML::FormHandler' );
@@ -127,4 +127,4 @@ $form->process( $init_object );
ok( !$form->validated, 'form did not validate' );
is( $form->num_errors, 2, 'form has two errors' );
-
+done_testing;
View
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More;
use lib ('t/lib');
@@ -36,3 +36,4 @@ is( $form->field('bar')->foo_attr, 'xxx', 'attribute set ok' );
ok( $form->field('bar')->foo_attr('test'), 'has extra attribute' );
is( $form->field('bar')->foo_attr, 'test', 'attribute was set' );
+done_testing;
View
@@ -7,11 +7,6 @@ use lib 't/lib';
use DateTime;
use Scalar::Util qw(blessed);
-BEGIN
-{
- plan tests => 12;
-}
-
{
package My::Form;
use HTML::FormHandler::Moose;
@@ -127,4 +122,4 @@ $params->{'date_time_fif.year'} = 1000;
$params->{'date_time_fif.day'} = 1;
is_deeply( $form->fif, $params, 'fif is correct' );
-
+done_testing;
View
@@ -1,8 +1,6 @@
use strict;
use warnings;
use Test::More;
-my $tests = 34;
-plan tests => $tests;
use_ok('HTML::FormHandler');
@@ -131,3 +129,5 @@ if ( !$form->process( params => { bar => 1, } ) )
fail("error messages match");
}
}
+
+done_testing;
View
@@ -1,5 +1,6 @@
-use Test::More tests => 9;
-
+use strict;
+use warnings;
+use Test::More;
use HTML::FormHandler::Field::Text;
@@ -76,3 +77,4 @@ is_deeply( $form->field('vegetables')->value, [2,4], 'vegetables value is correc
is_deeply( $form->fif, { fruit => 2, vegetables => [2, 4], test_field => '' }, 'fif is correct');
is_deeply( $form->values, { fruit => 2, vegetables => [2, 4] }, 'values are correct');
+done_testing;
View
@@ -1,4 +1,4 @@
-use Test::More tests => 20;
+use Test::More;
use lib 't/lib';
@@ -32,3 +32,5 @@ $form = Form::MultipleRole->new;
ok( $form, 'get form with roles' );
ok( $form->field('street'), 'field from Address role' );
ok( $form->field('email'), 'field from Person role' );
+
+done_testing;
View
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use Test::More tests => 21;
+use Test::More;
use_ok( 'HTML::FormHandler::Field::Repeatable' );
use_ok( 'HTML::FormHandler::Field::Repeatable::Instance' );
@@ -142,3 +142,4 @@ $form->clear_init_object;
$form->process( { my_test => 'test' } );
is_deeply( $form->value()->{addresses}, [], 'Addresses deleted' );
+done_testing;
View
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use Test::More tests => 7;
+use Test::More;
{
package Test::Form;
@@ -31,4 +31,4 @@ is_deeply( $form->fif, $fif, 'fif is correct' );
is_deeply( $form->value, $fif, 'value is correct' );
-
+done_testing;
View
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use Test::More tests => 6;
+use Test::More;
use_ok('HTML::FormHandler::Field::Repeatable');
@@ -36,3 +36,4 @@ is_deeply( $form->fif, $fif, 'fif is correct' );
is_deeply( $form->values, $params, 'values are correct' );
+done_testing;
View
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use Test::More tests => 22;
+use Test::More;
use lib 't/lib';
use_ok( 'HTML::FormHandler::Field::Text' );
@@ -125,3 +125,4 @@ ok( $form->field('_password')->has_errors, 'Password confirmation has errors' );
$form->process( params => { password => 'aaaaaa', _password => 'aaaaaa' } );
ok( $form->validated, 'password confirmation validated' );
+done_testing;
View
@@ -1,4 +1,6 @@
-use Test::More tests => 16;
+use strict;
+use warnings;
+use Test::More;
use HTML::FormHandler::Field::Text;
@@ -171,3 +173,5 @@ my $output = $form->render;
ok( $output, 'get rendered output from form');
is( $form->render_field( $form->field('no_render')), '', 'no_render' );
+
+done_testing;
View
@@ -1,4 +1,6 @@
-use Test::More tests => 2;
+use strict;
+use warnings;
+use Test::More;
use HTML::FormHandler::Field::Text;
@@ -68,4 +70,4 @@ ok( $form, 'create form');
ok( $form->render, 'get table rendered output from form');
-
+done_testing;
View
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use Test::More tests => 8;
+use Test::More;
my $struct = {
@@ -125,3 +125,5 @@ $form->process( $fif );
ok( $form->validated, 'form processed from fif' );
is_deeply( $form->values, $struct, 'values round-tripped from fif');
+
+done_testing;
View
@@ -1,8 +1,6 @@
-#! /usr/bin/perl -w
-
use strict;
use warnings;
-use Test::More tests => 21;
+use Test::More;
use Test::Exception;
use HTML::FormHandler::Types (':all');
@@ -90,5 +88,4 @@ $field->validate_field;
is( $field->errors->[0], 'Not a valid IP address', 'error from IPAddress' );
-
-
+done_testing;

0 comments on commit 0d967db

Please sign in to comment.