Delete basicrels tests. Modify run tests to use new syntax. Remove helperrels test...
[dbsrgits/DBIx-Class.git] / t / run / 21transactions.tl
index 8589fe8..fe3c453 100644 (file)
@@ -1,5 +1,12 @@
-sub run_tests {
-my $schema = shift;
+use strict;
+use warnings;  
+
+use Test::More;
+use lib qw(t/lib);
+use DBICTest;
+
+my $schema = DBICTest::init_schema();
+
 plan tests => 39;
 
 my $code = sub {
@@ -15,11 +22,10 @@ my $code = sub {
 
 # Test checking of parameters
 {
-
   eval {
     (ref $schema)->txn_do(sub{});
   };
-  like($@, qr/class method/, '$coderef parameter check ok');
+  like($@, qr/class method/, '$self parameter check ok');
   eval {
     $schema->txn_do('');
   };
@@ -170,6 +176,4 @@ my $fail_code = sub {
   })->first;
   ok(!defined($cd), q{failed txn_do didn't add failed txn's cd});
 }
-}
 
-1;