Delete basicrels tests. Modify run tests to use new syntax. Remove helperrels test...
[dbsrgits/DBIx-Class.git] / t / run / 145db2.tl
index aa721b1..36e5e8c 100644 (file)
@@ -1,5 +1,9 @@
-sub run_tests {
-my $schema = shift;
+use strict;
+use warnings;  
+
+use Test::More;
+use lib qw(t/lib);
+use DBICTest;
 
 my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_DB2_${_}" } qw/DSN USER PASS/};
 
@@ -14,10 +18,7 @@ DBICTest::Schema->compose_connection('DB2Test' => $dsn, $user, $pass);
 
 my $dbh = DB2Test->schema->storage->dbh;
 
-{
-    local $SIG{__WARN__} = sub {};
-    $dbh->do("DROP TABLE artist;");
-}
+$dbh->do("DROP TABLE artist", { RaiseError => 0, PrintError => 0 });
 
 $dbh->do("CREATE TABLE artist (artistid INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), name VARCHAR(255), charfield CHAR(10));");
 
@@ -71,6 +72,3 @@ is_deeply($type_info, $test_type_info, 'columns_info_for - column data types');
 # clean up our mess
 $dbh->do("DROP TABLE artist");
 
-}
-
-1;