Commit | Line | Data |
5ce67b0b |
1 | package IncTestApp;\r |
2 | # FIXME: I have to do this because TestApp runs setup at compile time\r |
3 | # Perhaps it would be better to let the tests run setup?\r |
4 | \r |
5 | use strict;\r |
6 | use Catalyst;\r |
7 | use FindBin;\r |
8 | use TestLog;\r |
9 | \r |
10 | our $VERSION = '0.01';\r |
11 | \r |
12 | IncTestApp->config(\r |
13 | name => 'TestApp',\r |
14 | debug => 1,\r |
15 | static => {\r |
16 | include_path => [\r |
17 | IncTestApp->config->{root},\r |
18 | ]\r |
19 | },\r |
20 | 'Plugin::Static::Simple' => {\r |
21 | include_path => [\r |
22 | IncTestApp->config->{root} . '/overlay',\r |
23 | ]\r |
24 | },\r |
25 | );\r |
26 | \r |
27 | IncTestApp->log( TestLog->new );\r |
28 | my @plugins = qw/Static::Simple/;\r |
29 | \r |
30 | # load the SubRequest plugin if available\r |
31 | eval { \r |
32 | require Catalyst::Plugin::SubRequest; \r |
33 | die unless Catalyst::Plugin::SubRequest->VERSION ge '0.08';\r |
34 | };\r |
35 | push @plugins, 'SubRequest' unless ($@);\r |
36 | \r |
37 | IncTestApp->setup( @plugins );\r |
38 | \r |
39 | sub incpath_generator {\r |
40 | my $c = shift;\r |
41 | \r |
42 | return [ $c->config->{root} . '/incpath' ];\r |
43 | }\r |
44 | \r |
45 | \r |
46 | 1;\r |