From: Dagfinn Ilmari Mannsåker Date: Thu, 23 Apr 2009 13:03:45 +0000 (+0000) Subject: Backport r4582 from branches/current: X-Git-Tag: 0.04006~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=665a69f12b90db955f7b62013ed5bba09b4ddc4b;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Backport r4582 from branches/current: Handle ResultSetManager deprecation warning in common tests --- diff --git a/Changes b/Changes index eb010bb..92ee58b 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ Revision history for Perl extension DBIx::Class::Schema::Loader 0.04006 Not Yet Released - Fix Oracle constraint detection for non-owned schemas (RT #35732) - Add result_base_class and schema_base_class options (RT #43977) + - Handle ResultSetManager deprecation warning in common tests 0.04005 Sat Apr 05, 2008 - Fix DB2 support diff --git a/t/lib/dbixcsl_common_tests.pm b/t/lib/dbixcsl_common_tests.pm index 75d6090..ada0338 100644 --- a/t/lib/dbixcsl_common_tests.pm +++ b/t/lib/dbixcsl_common_tests.pm @@ -85,17 +85,22 @@ sub run_tests { __PACKAGE__->connection(\@connect_info); }; ok(!$@, "Loader initialization") or diag $@; + + my $warn_count = 0; + $warn_count++ if grep /ResultSetManager/, @loader_warnings; + if($self->{skip_rels}) { - is(scalar(@loader_warnings), 0) + is(scalar(@loader_warnings), $warn_count) or diag "Did not get the expected 0 warnings. Warnings are: " . join('',@loader_warnings); ok(1); } else { - is(scalar(@loader_warnings), 1) + $warn_count++; + is(scalar(@loader_warnings), $warn_count) or diag "Did not get the expected 1 warning. Warnings are: " . join('',@loader_warnings); - like($loader_warnings[0], qr/loader_test9 has no primary key/i); + is(grep(/loader_test9 has no primary key/, @loader_warnings), 1); } }