Only set up the leakchecker for the tests that need it.
Florian Ragwitz [Thu, 14 Jan 2010 05:45:09 +0000 (05:45 +0000)]
That way we avoid the useless Devel::Cycle glob warnings.

t/lib/TestApp.pm
t/live_component_controller_context_closure.t

index a2fc0b2..1e4d5c4 100644 (file)
@@ -20,7 +20,7 @@ our $VERSION = '0.01';
 
 TestApp->config( name => 'TestApp', root => '/some/dir' );
 
-if (eval { Class::MOP::load_class('CatalystX::LeakChecker'); 1 }) {
+if ($::setup_leakchecker && eval { Class::MOP::load_class('CatalystX::LeakChecker'); 1 }) {
     with 'CatalystX::LeakChecker';
 
     has leaks => (
index 34318ea..767822d 100644 (file)
@@ -13,6 +13,8 @@ BEGIN {
 use FindBin;
 use lib "$FindBin::Bin/lib";
 
+BEGIN { $::setup_leakchecker = 1 }
+
 use Catalyst::Test 'TestApp';
 
 {