Fix and test failure to merge include paths
[catagits/Catalyst-Plugin-Static-Simple.git] / t / lib / IncTestApp.pm
CommitLineData
5ce67b0b 1package 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
5use strict;\r
6use Catalyst;\r
7use FindBin;\r
8use TestLog;\r
9\r
10our $VERSION = '0.01';\r
11\r
12IncTestApp->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
27IncTestApp->log( TestLog->new );\r
28my @plugins = qw/Static::Simple/;\r
29\r
30# load the SubRequest plugin if available\r
31eval { \r
32 require Catalyst::Plugin::SubRequest; \r
33 die unless Catalyst::Plugin::SubRequest->VERSION ge '0.08';\r
34};\r
35push @plugins, 'SubRequest' unless ($@);\r
36\r
37IncTestApp->setup( @plugins );\r
38\r
39sub incpath_generator {\r
40 my $c = shift;\r
41 \r
42 return [ $c->config->{root} . '/incpath' ];\r
43}\r
44\r
45\r
461;\r