Expand closed STDERR test, check actual exception
[dbsrgits/DBIx-Class.git] / t / storage / txn.t
index 4d46e5b..efe3641 100644 (file)
@@ -26,9 +26,10 @@ my $code = sub {
     (ref $schema)->txn_do(sub{});
   }, qr/storage/, "can't call txn_do without storage");
 
-  throws_ok ( sub {
+  throws_ok {
     $schema->txn_do('');
-  }, qr/must be a CODE reference/, '$coderef parameter check ok');
+  } qr/\Qrun() requires a coderef to execute as its first argument/,
+  '$coderef parameter check ok';
 }
 
 # Test successful txn_do() - scalar/list context
@@ -112,7 +113,7 @@ for my $want (0,1) {
       die "$$ starts in txn!" if $s->storage->transaction_depth != 0;
       $s->txn_do ( sub {
         die "$$ not in txn!" if $s->storage->transaction_depth == 0;
-        $s->storage->dbh->do('SELECT 1') } 
+        $s->storage->dbh->do('SELECT 1') }
       );
       die "$$ did not finish txn!" if $s->storage->transaction_depth != 0;
     },