+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+
use strict;
use warnings;
use Test::Exception;
use Test::Warn;
-use lib qw(t/lib);
-
use DBICTest;
my $schema = DBICTest->init_schema;
isa_ok $@, $ap;
} qr/\QObjects of external exception class '$ap' stringify to '' (the empty string)/,
'Proper warning on encountered antipattern';
+
+ warnings_are {
+ $@ = $ap->new;
+ $schema->txn_do (sub { 1 });
+
+ $@ = $ap->new;
+ $schema->txn_scope_guard->commit;
+ } [], 'No spurious PSA warnings on pre-existing antipatterns in $@';
+
}
done_testing;