(travis) Remove makefile fixup, now hardcoded in the subrepo
[dbsrgits/DBIx-Class.git] / t / 749sqlanywhere.t
index 816186e..d4067b5 100644 (file)
@@ -1,12 +1,14 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+
 use strict;
 use warnings;
 
 use Test::More;
 use Test::Exception;
-use Scope::Guard ();
 use Try::Tiny;
 use DBIx::Class::Optional::Dependencies ();
-use lib qw(t/lib);
+use DBIx::Class::_Util 'scope_guard';
+
 use DBICTest;
 
 my ($dsn, $user, $pass)    = @ENV{map { "DBICTEST_SQLANYWHERE_${_}" }      qw/DSN USER PASS/};
@@ -48,7 +50,7 @@ foreach my $info (@info) {
     auto_savepoint => 1
   });
 
-  my $guard = Scope::Guard->new(\&cleanup);
+  my $guard = scope_guard { cleanup($schema) };
 
   my $dbh = $schema->storage->dbh;
 
@@ -177,7 +179,7 @@ EOF
       ok($rs->find($id)->$type eq $binstr{$size}, "verified inserted $size $type" );
     }
   }
+
   my @uuid_types = qw/uniqueidentifier uniqueidentifierstr/;
 
 # test uniqueidentifiers (and the cursor_class).
@@ -259,6 +261,7 @@ SQL
 done_testing;
 
 sub cleanup {
+  my $schema = shift;
   eval { $schema->storage->dbh->do("DROP TABLE $_") }
     for qw/artist artist_guid bindtype_test/;
 }