force/assume RaiseError/PrintError
[dbsrgits/DBIx-Class-Historic.git] / t / 19quotes.t
index 9efad9b..65a7f3f 100644 (file)
@@ -28,10 +28,8 @@ cmp_ok( $rs->count, '==', 1, "join with fields quoted");
 $rs = DBICTest::CD->search({},
             { 'order_by' => 'year DESC'});
 {
-       my $warnings = '';
-       local $SIG{__WARN__} = sub { $warnings .= $_[0] };
-       my $first = eval{ $rs->first() };
-       ok( $warnings =~ /ORDER BY terms/, "Problem with ORDER BY quotes" );
+       eval{ $rs->first() };
+       like( $@, qr/ORDER BY terms/, "Problem with ORDER BY quotes" );
 }
 
 my $order = 'year DESC';