From: Brandon Black Date: Tue, 18 Jul 2006 16:05:04 +0000 (+0000) Subject: removed Test::Warn X-Git-Tag: 0.03005~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9395f33a41ce0de5b8786c99677426be737e0d07;p=dbsrgits%2FDBIx-Class-Schema-Loader.git removed Test::Warn --- diff --git a/Build.PL b/Build.PL index 032aaaf..55484fb 100644 --- a/Build.PL +++ b/Build.PL @@ -27,7 +27,6 @@ my %arguments = ( }, build_requires => { 'Test::More' => 0.32, - 'Test::Warn' => 0.08, 'DBI' => 1.50, 'DBD::SQLite' => 1.12, }, diff --git a/t/22dump.t b/t/22dump.t index b01ce1c..19efcbc 100644 --- a/t/22dump.t +++ b/t/22dump.t @@ -1,6 +1,5 @@ use strict; use Test::More; -use Test::Warn; use lib qw(t/lib); use File::Path; use make_dbictest_db; @@ -26,7 +25,7 @@ my $dump_path = './t/_dump'; ); } -plan tests => 4; +plan tests => 8; rmtree($dump_path, 1, 0711); @@ -34,13 +33,19 @@ eval { DBICTest::Schema::1->connect($make_dbictest_db::dsn) }; ok(!$@, 'no death with dump_directory set') or diag "Dump failed: $@"; DBICTest::Schema::1->loader(undef); -warnings_like { DBICTest::Schema::1->connect($make_dbictest_db::dsn) } - [ - qr|Dumping manual schema|, - (qr|DBICTest/Schema/1.*?.pm exists, will not overwrite|) x 3, - qr|Schema dump completed| - ], - 'warn and skip when attempting to overwrite without option'; + +my @warn_output; +{ + local $SIG{__WARN__} = sub { push(@warn_output, @_) }; + DBICTest::Schema::1->connect($make_dbictest_db::dsn); +} +my @warnings_regexes = ( + qr|Dumping manual schema|, + (qr|DBICTest/Schema/1.*?.pm exists, will not overwrite|) x 3, + qr|Schema dump completed|, +); + +like(shift @warn_output, $_) foreach (@warnings_regexes); rmtree($dump_path, 1, 0711);