Add skipped test for ininite recursion issue, re-arrange TODO to put dev release...
Tomas Doran [Thu, 4 Dec 2008 21:25:30 +0000 (21:25 +0000)]
TODO
t/aggregate/live_engine_request_uri.t
t/lib/TestApp/RequestBaseBug.pm [new file with mode: 0644]

diff --git a/TODO b/TODO
index 572c182..318654a 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,11 +1,37 @@
-  - MooseX::Emulate::Class::Accessor::Fast 
-    - Tests for uses of C::A::F from Catalyst repos. - t0m
-    - New release once these are done.
+TBD pre 5.8000_04 dev release:
 
   - Go through everything which used to use CAF, and ensure that it now uses MX::E::CAF + tests, 
     extending t/caf_backcompat.t and replacing t/custom_request.t (t0m)
 
-  - Simple test for NEXT compat in core.
+  - Simple test for NEXT compat in core (t0m).
+
+  - Looks like stash is not available during prepare_path when running under
+    Catalyst::Test.. Run MojoMojo's t/01app.t and it will explode with
+    "Can't use an undefined value as a HASH reference" - test case for core
+    + fix maybe (marcus)
+
+---
+
+  - Make the skipped test at the bottom of t/aggregate/live_engine_request_uri.t
+    pass / not be skipped. (From what C::P::SmartURI used to do)
+
+    This can be fixed by the following patch:
+
+Index: lib/Catalyst/Request.pm
+===================================================================
+--- lib/Catalyst/Request.pm (revision 8709)
++++ lib/Catalyst/Request.pm (working copy)
+@@ -96,7 +96,7 @@
+   lazy => 1,
+   default => sub {
+     my $self = shift;
+-    return $self->path if $self->uri;
++    return $self->{path} if $self->{uri};
+   },
+ );
+
+    But I'd like a 2nd opinion from someone who knows core better than me
+    about if that is the correct fix.. (t0m / Caelum)
 
   - Common engine test failures, look into and get tests into core.
 
@@ -23,8 +49,9 @@
       . Fix core to use CMOP to look up metaclass, rather than ->meta method, and
         namespace::clean the meta method out, fix generated accessors to do the same?
 
-  - Catalyst::Plugin::SmartURI
-    - Core tests for behavior which causes it to fail (Caelum)
+  - MooseX::Emulate::Class::Accessor::Fast
+    - Tests for uses of C::A::F from Catalyst repos. - t0m
+    - New release once these are done.
 
   - Update Test suite to not assume MyApp ISA Controller
     - After that set up attr handlers that will output helpful error messages when you do it as well as how to fix it. (done already?)
index 7d1628d..ee6fdfd 100644 (file)
@@ -4,7 +4,7 @@ use warnings;
 use FindBin;
 use lib "$FindBin::Bin/../lib";
 
-use Test::More tests => 66;
+use Test::More tests => 68;
 use Catalyst::Test 'TestApp';
 use Catalyst::Request;
 
@@ -151,3 +151,12 @@ SKIP:
     is( $response->header( 'X-Catalyst-Param-c' ), '1', 'param "c" ok' );
 }
 
+SKIP: {
+    skip 'This currently causes infinite recursion', 2;
+    require TestApp::RequestBaseBug;
+    TestApp->request_class('TestApp::RequestBaseBug');
+    ok( my $response = request('http://localhost/engine/request/uri'), 'Request' );
+    ok( $response->is_success, 'Response Successful 2xx' );
+    TestApp->request_class('Catalyst::Request');
+}
+
diff --git a/t/lib/TestApp/RequestBaseBug.pm b/t/lib/TestApp/RequestBaseBug.pm
new file mode 100644 (file)
index 0000000..5edccde
--- /dev/null
@@ -0,0 +1,14 @@
+package TestApp::RequestBaseBug;
+
+use parent 'Catalyst::Request';
+
+sub uri {
+    my $self = shift;
+
+# this goes into infinite mutual recursion
+    $self->base;
+
+    $self->SUPER::uri(@_)
+}
+
+1;