diff --git a/test/db/hsqldb.rb b/test/db/hsqldb.rb
index <HASH>..<HASH> 100644
--- a/test/db/hsqldb.rb
+++ b/test/db/hsqldb.rb
@@ -7,6 +7,7 @@ ActiveRecord::Base.establish_connection(config)
 
 at_exit {
   # Clean up hsqldb when done
-  Dir['test.db*'].each {|f| File.delete(f)}
-  File.delete('hsqldb-testdb.log') rescue nil #can't delete on windows
+  require "fileutils"
+  Dir['test.db*'].each {|f| FileUtils.rm_rf(f)}
+  FileUtils.rm_rf('hsqldb-testdb.log') rescue nil #can't delete on windows
 }
Small tweak to the way hsqldb is cleaned up to be compatible with <I>