--- trunk/t/1-validate.t 2007/11/01 00:16:46 948 +++ trunk/t/1-validate.t 2007/11/01 00:16:48 949 @@ -1,31 +1,22 @@ #!/usr/bin/perl -w use strict; -use Test::More tests => 54; -use Test::Exception; use blib; -use Data::Dump qw/dump/; -use Cwd qw/abs_path/; +use Test::More tests => 54; BEGIN { +use_ok( 'WebPAC::Test' ); use_ok( 'WebPAC::Validate' ); } -my $debug = shift @ARGV; - -ok(my $abs_path = abs_path($0), "abs_path"); -$abs_path =~ s#/[^/]*$#/#; - -ok(my $v = new WebPAC::Validate( - debug => $debug, -), "new witout path"); +ok(my $v = new WebPAC::Validate(%LOG), "new witout path"); ok( ! $v->{rules}, 'no path' ); ok($v = new WebPAC::Validate( path => "$abs_path/data/validate_test", - debug => $debug, + %LOG, ), "new with path"); ok($v->{rules}, "rules exist"); @@ -89,7 +80,7 @@ if (ref($tmp) eq 'HASH') { return $tmp; } else { - diag "explanation: $tmp"; + diag "explanation: $tmp" if $debug; } } } else {