X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F103many_to_many_warning.t;h=9e5c19a8be66595fc366b3e30ffea9c2b5aadb8b;hb=e6977bbbc3dfb119cc11ee7e235ca58dfef7e7e6;hp=37a0472851feb360158617f9dc900aa7021d0ee4;hpb=b7d1831a079d9b463231d8bbc764b8f628bfbec7;p=dbsrgits%2FDBIx-Class.git diff --git a/t/103many_to_many_warning.t b/t/103many_to_many_warning.t index 37a0472..9e5c19a 100644 --- a/t/103many_to_many_warning.t +++ b/t/103many_to_many_warning.t @@ -3,15 +3,17 @@ use warnings; 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 $@; @@ -20,7 +22,7 @@ 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 => 2 );