--- trunk/t/02-frey-introspect.t 2008/07/02 21:10:57 49 +++ trunk/t/02-frey-introspect.t 2008/07/05 15:19:55 53 @@ -4,7 +4,7 @@ my $debug = @ARGV ? 1 : 0; -use Test::More tests => 8; +use Test::More tests => 21; use lib 'lib'; #use Devel::LeakTrace::Fast; @@ -13,20 +13,27 @@ BEGIN { use_ok('Frey::Introspect'); use_ok('Strix::User'); + use_ok('Frey'); } -my $package = 'Strix::User'; +foreach my $package ( 'Strix::User', 'Frey' ) { -ok( my $o = Frey::Introspect->new( debug => $debug, package => $package ), 'new' ); -isa_ok( $o, 'Frey::Introspect' ); -diag dump( $o ) if $debug; + ok( my $o = Frey::Introspect->new( debug => $debug, package => $package ), 'new' ); + isa_ok( $o, 'Frey::Introspect' ); + diag dump( $o ) if $debug; -ok( $o->meta, 'has meta' ); -#diag dump( $o->meta ); -is( $o->meta->name, 'Frey::Introspect', 'meta->name' ); + ok( $o->meta, 'has meta' ); + #diag dump( $o->meta ); + is( $o->meta->name, 'Frey::Introspect', 'meta->name' ); -ok( defined $o->debug, 'debug' ); + ok( defined $o->debug, 'debug' ); + ok( ! $o->path, 'no path' ); -ok( my $examine = $o->examine, 'examine' ); -diag dump( $examine ) if $debug; + ok( my $js = $o->joose, 'joose' ); + diag dump( $js ) if $debug; + ok( $o->path, 'path' ); + + ok( my @methods = $o->methods, 'methods' ); + diag dump( @methods ) if $debug; +}