use Test::More;
use lib qw(t/lib);
-use Data::Dumper;
+use DBICTest;
-plan tests => 4;
my $exp_warn = qr/The many-to-many relationship 'bars' is trying to create/;
{
- my @w;
+ my @w;
local $SIG{__WARN__} = sub { $_[0] =~ $exp_warn ? push @w, $_[0] : warn $_[0] };
my $code = gen_code ( suffix => 1 );
+
+ local $ENV{DBIC_OVERWRITE_HELPER_METHODS_OK};
eval "$code";
ok (! $@, 'Eval code without warnings suppression')
|| diag $@;
}
{
- my @w;
+ my @w;
local $SIG{__WARN__} = sub { $_[0] =~ $exp_warn ? push @w, $_[0] : warn $_[0] };
my $code = gen_code ( suffix => 2 );
EOF
}
+
+done_testing;