stop using Moo as a test package
[catagits/Catalyst-Runtime.git] / t / aggregate / live_component_controller_action_path_matchsingle.t
1 use strict;
2 use warnings;
3
4 use FindBin;
5 use lib "$FindBin::Bin/../lib";
6
7 our $iters;
8
9 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
10
11 use Test::More;
12 use Catalyst::Test 'TestAppMatchSingleArg';
13
14 plan 'skip_all' if ( $ENV{CATALYST_SERVER} );
15
16 plan tests => 3*$iters;
17
18 if ( $ENV{CAT_BENCHMARK} ) {
19     require Benchmark;
20     Benchmark::timethis( $iters, \&run_tests );
21 }
22 else {
23     for ( 1 .. $iters ) {
24         run_tests();
25     }
26 }
27
28 sub run_tests {
29     {
30         is(get('/foo/bar/baz'), 'Path', 'multiple args matched :Path');
31         is(get('/foo'), 'Path Args(1)', 'single arg matched :Path Args(1)');
32         is(get('/foo/bar'), 'Path Args(2)', 'two args matched :Path Args(2)');
33     }
34 }