/[Frey]/trunk/t/02-frey-introspect.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/02-frey-introspect.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 49 by dpavlin, Wed Jul 2 21:10:57 2008 UTC revision 53 by dpavlin, Sat Jul 5 15:19:55 2008 UTC
# Line 4  use warnings; Line 4  use warnings;
4    
5  my $debug = @ARGV ? 1 : 0;  my $debug = @ARGV ? 1 : 0;
6    
7  use Test::More tests => 8;  use Test::More tests => 21;
8  use lib 'lib';  use lib 'lib';
9    
10  #use Devel::LeakTrace::Fast;  #use Devel::LeakTrace::Fast;
# Line 13  use Data::Dump qw/dump/; Line 13  use Data::Dump qw/dump/;
13  BEGIN {  BEGIN {
14          use_ok('Frey::Introspect');          use_ok('Frey::Introspect');
15          use_ok('Strix::User');          use_ok('Strix::User');
16            use_ok('Frey');
17  }  }
18    
19  my $package = 'Strix::User';  foreach my $package ( 'Strix::User', 'Frey' ) {
20    
21  ok( my $o = Frey::Introspect->new( debug => $debug, package => $package ), 'new' );          ok( my $o = Frey::Introspect->new( debug => $debug, package => $package ), 'new' );
22  isa_ok( $o, 'Frey::Introspect' );          isa_ok( $o, 'Frey::Introspect' );
23  diag dump( $o ) if $debug;          diag dump( $o ) if $debug;
24    
25  ok( $o->meta, 'has meta' );          ok( $o->meta, 'has meta' );
26  #diag dump( $o->meta );          #diag dump( $o->meta );
27  is( $o->meta->name, 'Frey::Introspect', 'meta->name' );          is( $o->meta->name, 'Frey::Introspect', 'meta->name' );
28    
29  ok( defined $o->debug, 'debug' );          ok( defined $o->debug, 'debug' );
30            ok( ! $o->path, 'no path' );
31    
32  ok( my $examine = $o->examine, 'examine' );          ok( my $js = $o->joose, 'joose' );
33  diag dump( $examine ) if $debug;          diag dump( $js ) if $debug;
34    
35            ok( $o->path, 'path' );
36    
37            ok( my @methods = $o->methods, 'methods' );
38            diag dump( @methods ) if $debug;
39    }

Legend:
Removed from v.49  
changed lines
  Added in v.53

  ViewVC Help
Powered by ViewVC 1.1.26