/[Frey]/branches/mojo/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 /branches/mojo/t/02-frey-introspect.t

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

revision 51 by dpavlin, Thu Jul 3 19:51:18 2008 UTC revision 65 by dpavlin, Tue Jul 8 16:18:39 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 => 21;  use Test::More tests => 66;
8  use lib 'lib';  use lib 'lib';
9    
10  #use Devel::LeakTrace::Fast;  #use Devel::LeakTrace::Fast;
# Line 16  BEGIN { Line 16  BEGIN {
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' );
# Line 29  foreach my $package ( 'Strix::User', 'Fr Line 31  foreach my $package ( 'Strix::User', 'Fr
31          ok( defined $o->debug, 'debug' );          ok( defined $o->debug, 'debug' );
32          ok( ! $o->path, 'no path' );          ok( ! $o->path, 'no path' );
33    
34          ok( my $examine = $o->examine, 'examine' );          ok( my $js = $o->joose, 'joose' );
35          diag dump( $examine ) if $debug;          diag dump( $js ) if $debug;
36    
37          ok( $o->path, 'path' );          ok( $o->path, 'path' );
38    
39          my $cmd = 'js ' . $o->path;          ok( my @methods = $o->methods, 'methods' );
40          my $syntax = `$cmd 2>&1`;          diag dump( @methods ) if $debug;
         diag $syntax;  
   
         ok( ! $syntax, 'syntax' );  
41  }  }

Legend:
Removed from v.51  
changed lines
  Added in v.65

  ViewVC Help
Powered by ViewVC 1.1.26