[Bast-commits] r4960 - in DBIx-Class/0.08/trunk: . t/cdbi-t
schwern at dev.catalyst.perl.org
schwern at dev.catalyst.perl.org
Fri Oct 24 04:00:58 BST 2008
Author: schwern
Date: 2008-10-24 04:00:57 +0100 (Fri, 24 Oct 2008)
New Revision: 4960
Modified:
DBIx-Class/0.08/trunk/Makefile.PL
DBIx-Class/0.08/trunk/t/cdbi-t/set_to_undef.t
Log:
Annoying DBD::SQLite warning is tripping up Test::NoWarnings.
Work around it.
Modified: DBIx-Class/0.08/trunk/Makefile.PL
===================================================================
--- DBIx-Class/0.08/trunk/Makefile.PL 2008-10-24 02:54:25 UTC (rev 4959)
+++ DBIx-Class/0.08/trunk/Makefile.PL 2008-10-24 03:00:57 UTC (rev 4960)
@@ -32,7 +32,6 @@
test_requires 'DBD::SQLite' => 1.13;
test_requires 'Test::Builder' => 0.33;
test_requires 'Test::Warn' => 0.11;
-test_requires 'Test::NoWarnings' => 0.08;
test_requires 'Test::Exception' => 0;
install_script 'script/dbicadmin';
Modified: DBIx-Class/0.08/trunk/t/cdbi-t/set_to_undef.t
===================================================================
--- DBIx-Class/0.08/trunk/t/cdbi-t/set_to_undef.t 2008-10-24 02:54:25 UTC (rev 4959)
+++ DBIx-Class/0.08/trunk/t/cdbi-t/set_to_undef.t 2008-10-24 03:00:57 UTC (rev 4960)
@@ -8,11 +8,16 @@
plan skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@"
if $@;
plan skip_all => "DateTime required" unless eval { require DateTime };
- plan tests => 1;
+ plan tests => 2;
}
-use Test::NoWarnings;
+# Don't use Test::NoWarnings because of an unrelated DBD::SQLite warning.
+my @warnings;
+local $SIG{__WARN__} = sub {
+ push @warnings, @_;
+};
+
{
package Thing;
@@ -23,4 +28,7 @@
my $thing = Thing->construct({ thing_id => 23, this => 42 });
$thing->set( this => undef );
+is $thing->get( "this" ), undef, 'undef set';
$thing->discard_changes;
+
+is @warnings, 0, 'no warnings';
More information about the Bast-commits
mailing list