[Bast-commits] r3339 - branches/DBIx-Class-current/t
matthewt at dev.catalyst.perl.org
matthewt at dev.catalyst.perl.org
Sun May 20 01:09:33 GMT 2007
Author: matthewt
Date: 2007-05-20 01:09:33 +0100 (Sun, 20 May 2007)
New Revision: 3339
Modified:
branches/DBIx-Class-current/t/30dbicplain.t
Log:
deprecation warning for compose_connection now caught and tested
Modified: branches/DBIx-Class-current/t/30dbicplain.t
===================================================================
--- branches/DBIx-Class-current/t/30dbicplain.t 2007-05-20 00:05:23 UTC (rev 3338)
+++ branches/DBIx-Class-current/t/30dbicplain.t 2007-05-20 00:09:33 UTC (rev 3339)
@@ -5,8 +5,17 @@
use Test::More;
use lib qw(t/lib);
-use DBICTest::Plain;
-plan tests => 1;
+plan tests => 3;
+my @warnings;
+
+{
+ local $SIG{__WARN__} = sub { push(@warnings, $_[0]); };
+ require DBICTest::Plain;
+}
+
+like($warnings[0], qr/compose_connection deprecated as of 0\.08000/,
+ 'deprecation warning emitted ok');
+cmp_ok(@warnings, '==', 1, 'no unexpected warnings');
cmp_ok(DBICTest::Plain->resultset('Test')->count, '>', 0, 'count is valid');
More information about the Bast-commits
mailing list