[Rt-commit] r15915 - in rt/3.8/trunk: lib/RT/Test

sartak at bestpractical.com sartak at bestpractical.com
Thu Sep 11 04:54:37 EDT 2008


Author: sartak
Date: Thu Sep 11 04:54:36 2008
New Revision: 15915

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/lib/RT/Test/Web.pm

Log:
 r71647 at onn:  sartak | 2008-09-11 04:53:58 -0400
 Test functions should always return with whether they passed or failed


Modified: rt/3.8/trunk/lib/RT/Test/Web.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Test/Web.pm	(original)
+++ rt/3.8/trunk/lib/RT/Test/Web.pm	Thu Sep 11 04:54:36 2008
@@ -160,16 +160,17 @@
     my @warnings = $self->get_warnings;
     if (@warnings == 0) {
         Test::More::fail("no warnings emitted; expected 1");
+        return 0;
     }
     elsif (@warnings > 1) {
         Test::More::fail(scalar(@warnings) . " warnings emitted; expected 1");
         for (@warnings) {
             Test::More::diag("got warning: $_");
         }
+        return 0;
     }
-    else {
-        Test::More::like($warnings[0], $re, $name);
-    }
+
+    return Test::More::like($warnings[0], $re, $name);
 }
 
 1;


More information about the Rt-commit mailing list