Commit | Line | Data |
---|---|---|
dd4e6fd2 | 1 | package TestApp; |
2 | ||
3 | use strict; | |
836e1134 | 4 | use Catalyst qw/ |
3d101ef9 | 5 | Test::MangleDollarUnderScore |
836e1134 | 6 | Test::Errors |
7 | Test::Headers | |
8 | Test::Plugin | |
4ca147fa | 9 | Test::Inline |
836e1134 | 10 | +TestApp::Plugin::FullyQualified |
083ee5d9 | 11 | +TestApp::Plugin::AddDispatchTypes |
e5210a95 | 12 | +TestApp::Role |
836e1134 | 13 | /; |
1408d0a4 | 14 | use Catalyst::Utils; |
fdcc808c | 15 | use TestApp::Context; |
dd4e6fd2 | 16 | |
d9d8aa51 | 17 | use Moose; |
18 | use namespace::autoclean; | |
19 | ||
dd4e6fd2 | 20 | our $VERSION = '0.01'; |
21 | ||
fbcc39ad | 22 | TestApp->config( name => 'TestApp', root => '/some/dir' ); |
dd4e6fd2 | 23 | |
fdcc808c | 24 | TestApp->context_class( 'TestApp::Context' ); |
dd4e6fd2 | 25 | TestApp->setup; |
26 | ||
8153c836 | 27 | # Replace the very large HTML error page with |
28 | # useful info if something crashes during a test | |
29 | sub finalize_error { | |
30 | my $c = shift; | |
31 | ||
dbb2d5cd | 32 | $c->next::method(@_); |
8153c836 | 33 | |
34 | $c->res->status(500); | |
35 | $c->res->body( 'FATAL ERROR: ' . join( ', ', @{ $c->error } ) ); | |
36 | } | |
37 | ||
369c09bc | 38 | { |
39 | no warnings 'redefine'; | |
40 | sub Catalyst::Log::error { } | |
41 | } | |
4ca147fa | 42 | |
43 | # Make sure we can load Inline plugins. | |
44 | ||
45 | package Catalyst::Plugin::Test::Inline; | |
46 | ||
47 | use strict; | |
48 | ||
c057ae86 | 49 | use base qw/Class::Data::Inheritable/; |
4ca147fa | 50 | |
f3414019 | 51 | 1; |