X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestApp.pm;h=94bddd9d715a1d4c435ca5fca5f3c241a8267ca7;hb=fdcc808c0c3e0c1b24940b21f62f892d4700e998;hp=a2fc0b25e577229c21565f0c71c5aed47b490a50;hpb=815217cdbf6e554b2ecd32fe508723f14051b0f1;p=catagits%2FCatalyst-Runtime.git diff --git a/t/lib/TestApp.pm b/t/lib/TestApp.pm index a2fc0b2..94bddd9 100644 --- a/t/lib/TestApp.pm +++ b/t/lib/TestApp.pm @@ -12,6 +12,7 @@ use Catalyst qw/ +TestApp::Role /; use Catalyst::Utils; +use TestApp::Context; use Moose; use namespace::autoclean; @@ -20,25 +21,7 @@ our $VERSION = '0.01'; TestApp->config( name => 'TestApp', root => '/some/dir' ); -if (eval { Class::MOP::load_class('CatalystX::LeakChecker'); 1 }) { - with 'CatalystX::LeakChecker'; - - has leaks => ( - is => 'ro', - default => sub { [] }, - ); -} - -sub found_leaks { - my ($ctx, @leaks) = @_; - push @{ $ctx->leaks }, @leaks; -} - -sub count_leaks { - my ($ctx) = @_; - return scalar @{ $ctx->leaks }; -} - +TestApp->context_class( 'TestApp::Context' ); TestApp->setup; sub execute {