[Bps-public-commit] r16617 - in Path-Dispatcher/trunk: t

sartak at bestpractical.com sartak at bestpractical.com
Wed Oct 29 21:06:40 EDT 2008


Author: sartak
Date: Wed Oct 29 21:06:40 2008
New Revision: 16617

Modified:
   Path-Dispatcher/trunk/   (props changed)
   Path-Dispatcher/trunk/t/010-return.t

Log:
 r74847 at onn:  sartak | 2008-10-29 21:06:35 -0400
 Test fixes


Modified: Path-Dispatcher/trunk/t/010-return.t
==============================================================================
--- Path-Dispatcher/trunk/t/010-return.t	(original)
+++ Path-Dispatcher/trunk/t/010-return.t	Wed Oct 29 21:06:40 2008
@@ -10,26 +10,26 @@
 $dispatcher->add_rule(
     Path::Dispatcher::Rule::Regex->new(
         regex => qr/foo/,
-        block => sub { return @_ },
+        block => sub { "foo" },
     ),
 );
 
-is_deeply([$dispatcher->run('foo', 42)], []);
+is_deeply([$dispatcher->run('foo', 42)], ["foo"]);
 
 my $dispatch = $dispatcher->dispatch('foo');
-is_deeply([$dispatch->run(24)], []);
+is_deeply([$dispatch->run(24)], ["foo"]);
 
 for my $stage (qw/before_on on after_on/) {
     $dispatcher->add_rule(
         Path::Dispatcher::Rule::Regex->new(
             regex => qr/foo/,
-            block => sub { return @_ },
+            block => sub { $stage },
         ),
     );
 }
 
-is_deeply([$dispatcher->run('foo', 42)], []);
+is_deeply([$dispatcher->run('foo', 42)], ["foo"]);
 
 $dispatch = $dispatcher->dispatch('foo');
-is_deeply([$dispatch->run(24)], []);
+is_deeply([$dispatch->run(24)], ["foo"]);
 



More information about the Bps-public-commit mailing list