added test to manifest
[MARC-Fast] / t / 001_marc.t
index c05fcd6..ddb9070 100755 (executable)
@@ -4,7 +4,7 @@ use strict;
 use blib;
 
 use Test::More tests => 63;
-use Test::Exception;
+use Data::Dump qw/dump/;
 
 BEGIN {
        use_ok( 'MARC::Fast' );
@@ -14,19 +14,16 @@ my $debug = shift @ARGV;
 
 my $marc_file = 't/camel.usmarc';
 
-if ( $debug ) {
-       eval { require Data::Dump; };
-       $debug = 0 if ($@);
-}
-
 my $marc;
 my %param;
 
-throws_ok { $marc = MARC::Fast->new(%param); } qr/marcdb/, "marcdb parametar";
+eval { $marc = MARC::Fast->new(%param) };
+ok( $@ =~ /marcdb/, "marcdb parametar" );
 
 $param{marcdb} = '/foo/bar/file';
 
-throws_ok { $marc = MARC::Fast->new(%param); } qr/foo.bar/, "marcdb exist";
+eval { $marc = MARC::Fast->new(%param) };
+ok( $@ =~ /foo.bar/, "marcdb exist" );
 
 $param{marcdb} = $marc_file if -e $marc_file;