next unless $dsn;
+ note "Testing with ${prefix}_DSN";
+
skip ("Testing with ${prefix}_DSN needs " . DBIx::Class::Optional::Dependencies->req_missing_for( $env2optdep->{$prefix} ), 1)
unless DBIx::Class::Optional::Dependencies->req_ok_for($env2optdep->{$prefix});
# test savepoints
throws_ok {
$schema->txn_do(sub {
+ my ($schema, $ars) = @_;
eval {
$schema->txn_do(sub {
$ars->create({ name => 'in_savepoint' });
'savepoint rolled back');
$ars->create({ name => 'in_outer_txn' });
die "rolling back outer txn";
- });
+ }, $schema, $ars);
} qr/rolling back outer txn/,
'correct exception for rollback';