--- trunk/t/01-frey-classloader.t 2008/11/07 20:46:10 330 +++ trunk/t/01-frey-classloader.t 2008/11/18 14:07:28 412 @@ -4,7 +4,7 @@ my $debug = @ARGV ? 1 : 0; -use Test::More tests => 17; +use Test::More tests => 29; use lib 'lib'; #use Devel::LeakTrace::Fast; @@ -30,8 +30,8 @@ ok( $o->classes, 'classes again' ); ok( my $available = $o->load_all_classes, 'load_all_classes' ); -isa_ok( $available, 'HASH' ); diag dump( $available ) if $debug; +isa_ok( $available, 'HASH' ); ok( $available->{$_}, "have $_" ) foreach ( qw/Frey Frey::Introspect Frey::Run/ ); @@ -39,6 +39,8 @@ my $test = { 'Frey' => 0, 'Frey::Web' => 1, + 'Moose' => 0, + 'Fey' => 0, }; foreach my $p ( keys %$test ) { @@ -46,3 +48,17 @@ is( $is_role, $test->{$p}, $is_role ? 'role' : 'not role' ); diag $meta->dump(2) if $debug; } + +my $methods = { + 'Frey::Config' => [ 'config', 'load_config' ], + 'Frey::Editor' => [ 'url_regex', 'command' ], +}; + +foreach my $class ( keys %$methods ) { + ok( my @m = $o->class_methods($class), "class_methods( $class ) as array" ); + diag dump( @m ); + is_deeply( \@m, $methods->{$class}, 'without meta' ); + foreach my $method ( @{ $methods->{$class} } ) { + ok( $o->class_methods($class)->{ $method }, "$class has $method" ); + } +}