execute is now in Context - fixing test libs (for example test t/aggregate/live_compo...
[catagits/Catalyst-Runtime.git] / t / lib / TestApp.pm
CommitLineData
dd4e6fd2 1package TestApp;
2
3use strict;
836e1134 4use 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 14use Catalyst::Utils;
fdcc808c 15use TestApp::Context;
dd4e6fd2 16
d9d8aa51 17use Moose;
18use namespace::autoclean;
19
dd4e6fd2 20our $VERSION = '0.01';
21
fbcc39ad 22TestApp->config( name => 'TestApp', root => '/some/dir' );
dd4e6fd2 23
fdcc808c 24TestApp->context_class( 'TestApp::Context' );
dd4e6fd2 25TestApp->setup;
26
8153c836 27# Replace the very large HTML error page with
28# useful info if something crashes during a test
29sub 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
45package Catalyst::Plugin::Test::Inline;
46
47use strict;
48
c057ae86 49use base qw/Class::Data::Inheritable/;
4ca147fa 50
f3414019 511;