Try using Test::CleanNamespaces, which doesn't work for me at the moment due to havin...
t0m [Sun, 24 May 2009 20:46:48 +0000 (21:46 +0100)]
Makefile.PL
t/00load_and_sane.t
t/01_clean_namespaces.t [new file with mode: 0644]

index b294dcb..619ad7f 100644 (file)
@@ -12,6 +12,8 @@ requires 'MooseX::Role::Parameterized' => '0.06';
 requires 'Catalyst::Runtime' => '5.80004';
 requires 'List::MoreUtils';
 
+test_requires 'Test::CleanNamespaces' => '0.01';
+
 resources repository => 'git@github.com:bobtfish/catalyst-dynamicappdemo.git';
 
 auto_install;
index ae4894f..1908dde 100644 (file)
@@ -27,9 +27,6 @@ ok ! any( sub { ! $_->isa('Moose::Object') },
     ),
     'Moose in da hoose';
 
-ok ! any(sub { $_->can('has') && warn("$_ can has") && 1; }, @modules),
-    'However, no lolcat to be found';
-
 ok all( sub  { $_->meta->is_immutable },
         grep { $_->meta !~ /::Role/   } # Skip roles, ewww. I would test
                                         # ->isa('Moose::Role') but that fails
diff --git a/t/01_clean_namespaces.t b/t/01_clean_namespaces.t
new file mode 100644 (file)
index 0000000..2e7d971
--- /dev/null
@@ -0,0 +1,6 @@
+use strict;
+use warnings;
+use Test::CleanNamespaces;
+
+all_namespaces_clean;
+