Passing test for mssql odbc bulk insert bug fixed by fabbd5cca9
[dbsrgits/DBIx-Class.git] / t / inflate / datetime_sqlanywhere.t
index 6788f87..676665f 100644 (file)
@@ -1,8 +1,7 @@
 use strict;
-use warnings;  
+use warnings;
 
 use Test::More;
-use Test::Exception;
 use Scope::Guard ();
 use DBIx::Class::Optional::Dependencies ();
 use lib qw(t/lib);
@@ -50,7 +49,7 @@ foreach my $info (@info) {
     on_connect_call => 'datetime_setup',
   });
 
-  my $sg = Scope::Guard->new(\&cleanup); 
+  my $sg = Scope::Guard->new(sub { cleanup($schema) } );
 
   eval { $schema->storage->dbh->do('DROP TABLE event') };
   $schema->storage->dbh->do(<<"SQL");
@@ -98,6 +97,7 @@ done_testing;
 
 # clean up our mess
 sub cleanup {
+  my $schema = shift;
   if (my $dbh = $schema->storage->dbh) {
     eval { $dbh->do("DROP TABLE $_") } for qw/event/;
   }