[Catalyst-commits] r13025 - Catalyst-Runtime/5.80/branches/psgi/t/aggregate

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Mon Mar 8 00:25:56 GMT 2010


Author: t0m
Date: 2010-03-08 00:25:56 +0000 (Mon, 08 Mar 2010)
New Revision: 13025

Modified:
   Catalyst-Runtime/5.80/branches/psgi/t/aggregate/unit_core_engine_cgi-prepare_path.t
Log:
Port tests to plack branch. Sorry, they still fail... Need to chat about if plack should make this work for us or not..

Modified: Catalyst-Runtime/5.80/branches/psgi/t/aggregate/unit_core_engine_cgi-prepare_path.t
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/t/aggregate/unit_core_engine_cgi-prepare_path.t	2010-03-07 22:49:04 UTC (rev 13024)
+++ Catalyst-Runtime/5.80/branches/psgi/t/aggregate/unit_core_engine_cgi-prepare_path.t	2010-03-08 00:25:56 UTC (rev 13025)
@@ -1,20 +1,14 @@
 use strict;
 use warnings;
 use Test::More;
-
-BEGIN {
-    plan skip_all => 'these tests should probably be moved to plack, or at least ported away from Engine::CGI';
-}
-
 use FindBin qw/$Bin/;
 use lib "$Bin/../lib";
 use TestApp;
-use Catalyst::Engine::CGI;
+use Catalyst::Engine;
 
 # mod_rewrite to app root for non / based app
 {
     my $r = get_req (
-        REDIRECT_URL => '/comics/',
         SCRIPT_NAME => '/comics/dispatch.cgi',
         REQUEST_URI => '/comics/',
     );
@@ -26,7 +20,6 @@
 {
     my $r = get_req (
         PATH_INFO  => '/foo/bar.gif',
-        REDIRECT_URL => '/comics/foo/bar.gif',
         SCRIPT_NAME => '/comics/dispatch.cgi',
         REQUEST_URI => '/comics/foo/bar.gif',
     );
@@ -81,11 +74,11 @@
         PATH_INFO => '/',
     );
 
-    local %ENV = (%template, @_);
-
+    my $engine = Catalyst::Engine->new(
+        env => { %template, @_ },
+    );
     my $i = TestApp->new;
-    $i->engine(Catalyst::Engine::CGI->new);
-    $i->engine->prepare_path($i);
+    $engine->prepare_path($i);
     return $i->req;
 }
 




More information about the Catalyst-commits mailing list