[Bast-commits] r5960 - in trunk/DBIx-Class-Schema-Loader: . t/lib
ilmari at dev.catalyst.perl.org
ilmari at dev.catalyst.perl.org
Thu Apr 23 13:03:46 GMT 2009
Author: ilmari
Date: 2009-04-23 14:03:45 +0100 (Thu, 23 Apr 2009)
New Revision: 5960
Modified:
trunk/DBIx-Class-Schema-Loader/Changes
trunk/DBIx-Class-Schema-Loader/t/lib/dbixcsl_common_tests.pm
Log:
Backport r4582 from branches/current:
Handle ResultSetManager deprecation warning in common tests
Modified: trunk/DBIx-Class-Schema-Loader/Changes
===================================================================
--- trunk/DBIx-Class-Schema-Loader/Changes 2009-04-23 13:03:42 UTC (rev 5959)
+++ trunk/DBIx-Class-Schema-Loader/Changes 2009-04-23 13:03:45 UTC (rev 5960)
@@ -3,6 +3,7 @@
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
Modified: trunk/DBIx-Class-Schema-Loader/t/lib/dbixcsl_common_tests.pm
===================================================================
--- trunk/DBIx-Class-Schema-Loader/t/lib/dbixcsl_common_tests.pm 2009-04-23 13:03:42 UTC (rev 5959)
+++ trunk/DBIx-Class-Schema-Loader/t/lib/dbixcsl_common_tests.pm 2009-04-23 13:03:45 UTC (rev 5960)
@@ -85,17 +85,22 @@
__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('', at 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('', at 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);
}
}
More information about the Bast-commits
mailing list