--- trunk/t/5-output-webpacus.t 2007/10/31 11:26:10 932 +++ trunk/t/5-output-webpacus.t 2007/11/01 00:16:48 949 @@ -1,28 +1,20 @@ #!/usr/bin/perl -w -use Test::More tests => 10; -use Test::Exception; -use Cwd qw/abs_path/; -use Data::Dump qw/dump/; -use blib; use strict; +use blib; + +use Test::More tests => 10; BEGIN { +use_ok( 'WebPAC::Test' ); use_ok( 'WebPAC::Output::Webpacus' ); } -my $debug = shift @ARGV; - -ok(my $abs_path = abs_path($0), "abs_path"); -$abs_path =~ s#/[^/]*$#/#; # -diag "abs_path: $abs_path"; -my $path = "$abs_path/sorted/"; - ok(my $out = new WebPAC::Output::Webpacus({ path => '/data/Webpacus2/', database => 'test', clean => 1, - debug => $debug, + %LOG }), "new"); ok( $out->init, 'init' ); @@ -49,7 +41,7 @@ ok( $out->add( 100, { foo => { sorted => [ qw/foo bar baz/ ] } } ), 'add 100' ); -diag "path: ",$out->path; +diag "path: ",$out->path if $debug; ok( $out->finish, 'finish' );