fix lighttpd tests when using local::lib
[catagits/Catalyst-Runtime.git] / t / aggregate / live_component_controller_action_local.t
index 24fc2e4..852b11f 100644 (file)
@@ -1,5 +1,3 @@
-#!perl
-
 use strict;
 use warnings;
 
@@ -110,11 +108,11 @@ sub run_tests {
     }
 
     SKIP:
-    { 
+    {
         if ( $ENV{CATALYST_SERVER} ) {
             skip "tests for %2F on remote server", 6;
         }
-        
+
         ok(
             my $response =
               request('http://localhost/action/local/one/foo%2Fbar'),
@@ -129,11 +127,17 @@ sub run_tests {
             'TestApp::Controller::Action::Local',
             'Test Class'
         );
-        like(
-            $response->content,
-            qr~arguments => \[\s*'foo/bar'\s*\]~,
-            "Parameters don't split on %2F"
-        );
+        my $content = $response->content;
+        {
+            local $@;
+            my $request = eval $content;
+            if ($@) {
+                fail("Content cannot be unserialized: $@ $content");
+            }
+            else {
+                is_deeply $request->arguments, ['foo/bar'], "Parameters don't split on %2F";
+            }
+        }
     }
 
     {