[Catalyst-commits] r10586 - in Catalyst-Runtime/5.80/branches/index_default_fuckage/t: aggregate lib lib/TestAppIndexDefault lib/TestAppIndexDefault/Controller

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Thu Jun 18 21:38:40 GMT 2009


Author: caelum
Date: 2009-06-18 21:38:40 +0000 (Thu, 18 Jun 2009)
New Revision: 10586

Added:
   Catalyst-Runtime/5.80/branches/index_default_fuckage/t/aggregate/live_component_controller_action_index_or_default_names.t
   Catalyst-Runtime/5.80/branches/index_default_fuckage/t/lib/TestAppIndexDefault.pm
   Catalyst-Runtime/5.80/branches/index_default_fuckage/t/lib/TestAppIndexDefault/
   Catalyst-Runtime/5.80/branches/index_default_fuckage/t/lib/TestAppIndexDefault/Controller/
   Catalyst-Runtime/5.80/branches/index_default_fuckage/t/lib/TestAppIndexDefault/Controller/IndexChained.pm
Log:
made a failing test

Added: Catalyst-Runtime/5.80/branches/index_default_fuckage/t/aggregate/live_component_controller_action_index_or_default_names.t
===================================================================
--- Catalyst-Runtime/5.80/branches/index_default_fuckage/t/aggregate/live_component_controller_action_index_or_default_names.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/index_default_fuckage/t/aggregate/live_component_controller_action_index_or_default_names.t	2009-06-18 21:38:40 UTC (rev 10586)
@@ -0,0 +1,29 @@
+#!perl
+
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+our $iters;
+
+BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
+
+use Test::More tests => 1*$iters;
+
+use Catalyst::Test 'TestAppIndexDefault';
+
+if ( $ENV{CAT_BENCHMARK} ) {
+    require Benchmark;
+    Benchmark::timethis( $iters, \&run_tests );
+}
+else {
+    for ( 1 .. $iters ) {
+        run_tests();
+    }
+}
+
+sub run_tests {
+    is(get('/indexchained'), 'index_chained', ':Chained overrides index');
+}

Added: Catalyst-Runtime/5.80/branches/index_default_fuckage/t/lib/TestAppIndexDefault/Controller/IndexChained.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/index_default_fuckage/t/lib/TestAppIndexDefault/Controller/IndexChained.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/index_default_fuckage/t/lib/TestAppIndexDefault/Controller/IndexChained.pm	2009-06-18 21:38:40 UTC (rev 10586)
@@ -0,0 +1,12 @@
+package TestAppIndexDefault::Controller::IndexChained;
+
+use base 'Catalyst::Controller';
+
+sub index : Chained('/') PathPart('indexchained') CaptureArgs(0) {}
+
+sub index_endpoint : Chained('index') PathPart('') Args(0) {
+    my ($self, $c) = @_;
+    $c->res->body('index_chained');
+}
+
+1;

Added: Catalyst-Runtime/5.80/branches/index_default_fuckage/t/lib/TestAppIndexDefault.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/index_default_fuckage/t/lib/TestAppIndexDefault.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/index_default_fuckage/t/lib/TestAppIndexDefault.pm	2009-06-18 21:38:40 UTC (rev 10586)
@@ -0,0 +1,8 @@
+package TestAppIndexDefault;
+use strict;
+use warnings;
+use Catalyst;
+
+__PACKAGE__->setup;
+
+1;




More information about the Catalyst-commits mailing list