4 # FIXME - This is all fairly gross and hacky. Surely there should be a nicer
5 # more generic approach.
8 use lib ("$Bin/lib", "$Bin/../lib");
10 use List::MoreUtils qw/any all/;
12 setmoduledirs("$Bin/../lib", "$Bin/lib");
14 use Test::More tests => 4;
19 @modules = (useall('CatalystX'), useall('DynamicAppDemo'));
23 ok ! any( sub { ! $_->isa('Moose::Object') },
24 grep { $_->meta !~ /::Role/ }
25 grep { ! $_->can('import') }
30 ok all( sub { $_->meta->is_immutable },
31 grep { $_->meta !~ /::Role/ } # Skip roles, ewww. I would test
32 # ->isa('Moose::Role') but that fails
33 # for parameterised roles..
34 grep { ! $_->can('import') } # Skip exporters
36 'And all classes are immutable';