From: Tomas Doran Date: Mon, 8 Mar 2010 00:25:56 +0000 (+0000) Subject: Port tests to plack branch. Sorry, they still fail... Need to chat about if plack... X-Git-Tag: 5.89000~35 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=d9d5d62dc1578d63fe37df91258875ea6cc34910 Port tests to plack branch. Sorry, they still fail... Need to chat about if plack should make this work for us or not.. --- diff --git a/t/aggregate/unit_core_engine_cgi-prepare_path.t b/t/aggregate/unit_core_engine_cgi-prepare_path.t index 3711d7e..06f4a50 100644 --- a/t/aggregate/unit_core_engine_cgi-prepare_path.t +++ b/t/aggregate/unit_core_engine_cgi-prepare_path.t @@ -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 @@ use Catalyst::Engine::CGI; { 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 @@ sub get_req { 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; }