Converted all relevant tests to use new_dbm instead of new_fh and all tests (except...
[dbsrgits/DBM-Deep.git] / t / 25_tie_return_value.t
index 4e3c676..6efc518 100644 (file)
@@ -1,16 +1,15 @@
 use strict;
+use warnings FATAL => 'all';
 
-use Test::More tests => 5;
-use File::Temp qw( tempfile tempdir );
+use Test::More;
+use t::common qw( new_fh );
 
 use_ok( 'DBM::Deep' );
 
-my $dir = tempdir( CLEANUP => 1 );
-
 use Scalar::Util qw( reftype );
 
 {
-    my ($fh, $filename) = tempfile( 'tmpXXXX', UNLINK => 1, DIR => $dir );
+    my ($fh, $filename) = new_fh();
 
     my %hash;
     my $obj = tie %hash, 'DBM::Deep', $filename;
@@ -19,10 +18,12 @@ use Scalar::Util qw( reftype );
 }
 
 {
-    my ($fh, $filename) = tempfile( 'tmpXXXX', UNLINK => 1, DIR => $dir );
+    my ($fh, $filename) = new_fh();
 
     my @array;
     my $obj = tie @array, 'DBM::Deep', $filename;
     isa_ok( $obj, 'DBM::Deep' );
     is( reftype( $obj ), 'HASH', "... and its underlying representation is an HASH" );
 }
+
+done_testing;