r11693@rob-kinyons-powerbook58: rob | 2006-04-30 22:15:38 -0400
[dbsrgits/DBM-Deep.git] / t / 23_misc.t
index 3407439..c2137b8 100644 (file)
@@ -16,7 +16,7 @@ is( $db->{key1}, "value1", "Value set correctly" );
 
 # Testing to verify that the close() will occur if open is called on an open DB.
 #XXX WOW is this hacky ...
-$db->_get_self->{engine}->open( $db->_get_self );
+$db->_get_self->_fileobj->open;
 is( $db->{key1}, "value1", "Value still set after re-open" );
 
 throws_ok {
@@ -32,8 +32,8 @@ throws_ok {
         file => $filename,
         locking => 1,
     );
-    $db->_get_self->{engine}->close_fh( $db->_get_self );
-    ok( !$db->lock );
+    $db->_get_self->_fileobj->close( $db->_get_self );
+    ok( !$db->lock, "Calling lock() on a closed database returns false" );
 }
 
 {
@@ -42,6 +42,6 @@ throws_ok {
         locking => 1,
     );
     $db->lock;
-    $db->_get_self->{engine}->close_fh( $db->_get_self );
-    ok( !$db->unlock );
+    $db->_get_self->_fileobj->close( $db->_get_self );
+    ok( !$db->unlock, "Calling unlock() on a closed database returns false" );
 }