From: Matt S Trout <mst@shadowcat.co.uk>
Date: Sun, 20 May 2007 00:09:33 +0000 (+0000)
Subject: deprecation warning for compose_connection now caught and tested
X-Git-Tag: v0.08010~150^2~62
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c55acdbcf79fff67401fd9e4bed0de28bc55f5c4;p=dbsrgits%2FDBIx-Class.git

deprecation warning for compose_connection now caught and tested
---

diff --git a/t/30dbicplain.t b/t/30dbicplain.t
index aa30169..f853286 100644
--- a/t/30dbicplain.t
+++ b/t/30dbicplain.t
@@ -5,8 +5,17 @@ use warnings;
 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');