From: Florian Ragwitz Date: Thu, 25 Sep 2008 22:39:44 +0000 (+0000) Subject: Remove warnings when running aggregated tests. X-Git-Tag: 5.8000_03~52 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=dcac0a272606616a591d345e982db88013704d0a Remove warnings when running aggregated tests. --- diff --git a/t/aggregate/live_component_controller_action_multipath.t b/t/aggregate/live_component_controller_action_multipath.t index be54df2..e4bb242 100644 --- a/t/aggregate/live_component_controller_action_multipath.t +++ b/t/aggregate/live_component_controller_action_multipath.t @@ -24,11 +24,13 @@ if ( $ENV{CAT_BENCHMARK} ) { } else { for ( 1 .. $iters ) { - run_tests(); + run_tests($content); } } sub run_tests { + my ($content) = @_; + # Local { ok( diff --git a/t/aggregate/unit_core_uri_for_action.t b/t/aggregate/unit_core_uri_for_action.t index 9b84582..d4f4148 100644 --- a/t/aggregate/unit_core_uri_for_action.t +++ b/t/aggregate/unit_core_uri_for_action.t @@ -120,17 +120,17 @@ is($context->uri_for($chained_action, [ 1 ], 2, { q => 1 }), # More Chained with Context Tests # { - sub __action { $dispatcher->get_action_by_path( @_ ) } + sub __action { shift->get_action_by_path( @_ ) } - is( $context->uri_for( __action( '/action/chained/endpoint2' ), [1,2], (3,4), { x => 5 } ), + is( $context->uri_for( __action( $dispatcher, '/action/chained/endpoint2' ), [1,2], (3,4), { x => 5 } ), 'http://127.0.0.1/foo/chained/foo2/1/2/end2/3/4?x=5', 'uri_for correct for chained with multiple captures and args' ); - is( $context->uri_for( __action( '/action/chained/three_end' ), [1,2,3], (4,5,6) ), + is( $context->uri_for( __action( $dispatcher, '/action/chained/three_end' ), [1,2,3], (4,5,6) ), 'http://127.0.0.1/foo/chained/one/1/two/2/3/three/4/5/6', 'uri_for correct for chained with multiple capturing actions' ); - my $action_needs_two = __action( '/action/chained/endpoint2' ); + my $action_needs_two = __action( $dispatcher, '/action/chained/endpoint2' ); ok( ! defined( $context->uri_for($action_needs_two, [1], (2,3)) ), 'uri_for returns undef for not enough captures' ); @@ -162,7 +162,7 @@ is($context->uri_for($chained_action, [ 1 ], 2, { q => 1 }), 'http://127.0.0.1/foo/chained/foo2/1/2/end2/3/', 'uri_for returns uri with empty arg on undef last argument' ); - my $complex_chained = __action( '/action/chained/empty_chain_f' ); + my $complex_chained = __action( $dispatcher, '/action/chained/empty_chain_f' ); is( $context->uri_for( $complex_chained, [23], (13), {q => 3} ), 'http://127.0.0.1/foo/chained/empty/23/13?q=3', 'uri_for returns correct uri for chain with many empty path parts' );