- Tweaked the error tests to handle more verbose error output
Matt S Trout [Sat, 10 Dec 2005 02:22:32 +0000 (02:22 +0000)]
t/lib/Catalyst/Plugin/Test/Errors.pm
t/live_engine_response_errors.t

index 4dc0d57..92fa63c 100644 (file)
@@ -21,7 +21,10 @@ sub error {
         $c->response->status(500);
     }
 
-    $c->response->headers->push_header( 'X-Catalyst-Error' => $_[0] );
+    my $error = $_[0];
+    $error =~ s/\n/, /g;
+
+    $c->response->headers->push_header( 'X-Catalyst-Error' => $error );
 
     $c->NEXT::error(@_);
 }
index de7f92b..1fb8842 100644 (file)
@@ -54,7 +54,7 @@ close STDERR;    # i'm naughty :)
     );
     like(
         $response->header('X-Catalyst-Error'),
-        qr/"I'm going to die!"$/,
+        qr/I'm going to die!/,
         'Catalyst Error'
     );
 }