4 |
|
|
5 |
my $debug = @ARGV ? 1 : 0; |
my $debug = @ARGV ? 1 : 0; |
6 |
|
|
7 |
use Test::More tests => 15; |
use Test::More tests => 66; |
8 |
use lib 'lib'; |
use lib 'lib'; |
9 |
|
|
10 |
#use Devel::LeakTrace::Fast; |
#use Devel::LeakTrace::Fast; |
16 |
use_ok('Frey'); |
use_ok('Frey'); |
17 |
} |
} |
18 |
|
|
19 |
foreach my $package ( 'Strix::User', 'Frey' ) { |
my $f = Frey->new; |
20 |
|
|
21 |
|
foreach my $package ( map { warn dump( $_ ); keys %$_ } @{ $f->classes } ) { |
22 |
|
|
23 |
ok( my $o = Frey::Introspect->new( debug => $debug, package => $package ), 'new' ); |
ok( my $o = Frey::Introspect->new( debug => $debug, package => $package ), 'new' ); |
24 |
isa_ok( $o, 'Frey::Introspect' ); |
isa_ok( $o, 'Frey::Introspect' ); |
29 |
is( $o->meta->name, 'Frey::Introspect', 'meta->name' ); |
is( $o->meta->name, 'Frey::Introspect', 'meta->name' ); |
30 |
|
|
31 |
ok( defined $o->debug, 'debug' ); |
ok( defined $o->debug, 'debug' ); |
32 |
|
ok( ! $o->path, 'no path' ); |
33 |
|
|
34 |
|
ok( my $js = $o->joose, 'joose' ); |
35 |
|
diag dump( $js ) if $debug; |
36 |
|
|
37 |
ok( my $examine = $o->examine, 'examine' ); |
ok( $o->path, 'path' ); |
|
diag dump( $examine ) if $debug; |
|
38 |
|
|
39 |
|
ok( my @methods = $o->methods, 'methods' ); |
40 |
|
diag dump( @methods ) if $debug; |
41 |
} |
} |