4 |
|
|
5 |
my $debug = @ARGV ? 1 : 0; |
my $debug = @ARGV ? 1 : 0; |
6 |
|
|
7 |
use Test::More tests => 114; |
use Test::More tests => 35; |
8 |
use lib 'lib'; |
use lib 'lib'; |
9 |
|
|
10 |
#use Devel::LeakTrace::Fast; |
#use Devel::LeakTrace::Fast; |
13 |
BEGIN { |
BEGIN { |
14 |
use_ok('Frey::ClassLoader'); |
use_ok('Frey::ClassLoader'); |
15 |
use_ok('Frey::Introspect'); |
use_ok('Frey::Introspect'); |
|
use_ok('Strix::User'); |
|
16 |
use_ok('Frey'); |
use_ok('Frey'); |
17 |
} |
} |
18 |
|
|
23 |
|
|
24 |
ok( $f->classes, 'classes again' ); |
ok( $f->classes, 'classes again' ); |
25 |
|
|
26 |
foreach my $package ( map { warn dump( $_ ); keys %$_ } @{ $f->classes } ) { |
my $more = 5; |
27 |
|
|
28 |
ok( my $o = Frey::Introspect->new( debug => $debug, package => $package ), 'new' ); |
foreach my $class ( $f->classes ) { |
29 |
|
|
30 |
|
diag $class; |
31 |
|
|
32 |
|
ok( my $o = Frey::Introspect->new( debug => $debug, class => $class ), 'new' ); |
33 |
isa_ok( $o, 'Frey::Introspect' ); |
isa_ok( $o, 'Frey::Introspect' ); |
34 |
diag dump( $o ) if $debug; |
diag dump( $o ) if $debug; |
35 |
|
|
38 |
is( $o->meta->name, 'Frey::Introspect', 'meta->name' ); |
is( $o->meta->name, 'Frey::Introspect', 'meta->name' ); |
39 |
|
|
40 |
ok( defined $o->debug, 'debug' ); |
ok( defined $o->debug, 'debug' ); |
|
ok( ! $o->path, 'no path' ); |
|
41 |
|
|
42 |
ok( my $js = $o->joose, 'joose' ); |
ok( my $js = $o->joose, 'joose' ); |
43 |
diag dump( $js ) if $debug; |
diag dump( $js ) if $debug; |
44 |
|
|
45 |
ok( $o->path, 'path' ); |
last unless --$more; |
|
|
|
|
ok( my @methods = $o->methods, 'methods' ); |
|
|
diag dump( @methods ) if $debug; |
|
46 |
} |
} |