X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F30dbicplain.t;h=736380eca6f29f87b559937699cadfefbfbdb695;hb=402ac1c9aa0b5bb5120ee8f6d8e62298a7a14223;hp=f85328650552ad0ef7f83333649984382c2f6955;hpb=c55acdbcf79fff67401fd9e4bed0de28bc55f5c4;p=dbsrgits%2FDBIx-Class.git diff --git a/t/30dbicplain.t b/t/30dbicplain.t index f853286..736380e 100644 --- a/t/30dbicplain.t +++ b/t/30dbicplain.t @@ -1,21 +1,18 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More; +use Test::Warn; use lib qw(t/lib); -plan tests => 3; - -my @warnings; +warnings_like { require DBICTest::Plain } + [ + qr/compose_connection deprecated as of 0\.08000/, + qr/\QDBIx::Class::ResultSetProxy is DEPRECATED/, + ], + 'no unexpected 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'); + +done_testing; \ No newline at end of file