4 |
|
|
5 |
my $debug = @ARGV ? 1 : 0; |
my $debug = @ARGV ? 1 : 0; |
6 |
|
|
7 |
use Test::More tests => 32; |
use Test::More tests => 33; |
8 |
use lib 'lib'; |
use lib 'lib'; |
9 |
|
|
10 |
#use Devel::LeakTrace::Fast; |
#use Devel::LeakTrace::Fast; |
11 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
12 |
|
|
13 |
BEGIN { |
BEGIN { |
14 |
use_ok('Frey::ClassLoader'); |
use_ok('Frey::Class::Loader'); |
15 |
} |
} |
16 |
|
|
17 |
ok( my $o = Frey::ClassLoader->new( debug => $debug ), 'new' ); |
ok( my $o = Frey::Class::Loader->new( debug => $debug ), 'new' ); |
18 |
isa_ok( $o, 'Frey::ClassLoader' ); |
isa_ok( $o, 'Frey::Class::Loader' ); |
19 |
diag dump( $o ) if $debug; |
diag dump( $o ) if $debug; |
20 |
|
|
21 |
ok( $o->meta, 'has meta' ); |
ok( $o->meta, 'has meta' ); |
22 |
#diag dump( $o->meta ); |
#diag dump( $o->meta ); |
23 |
is( $o->meta->name, 'Frey::ClassLoader', 'meta->name' ); |
is( $o->meta->name, 'Frey::Class::Loader', 'meta->name' ); |
24 |
|
|
25 |
ok( defined $o->debug, 'debug' ); |
ok( defined $o->debug, 'debug' ); |
26 |
|
|
68 |
|
|
69 |
my $methods = { |
my $methods = { |
70 |
'Frey::Config' => [ 'config', 'load_config' ], |
'Frey::Config' => [ 'config', 'load_config' ], |
71 |
'Frey::Editor' => [ 'url_regex', 'command' ], |
'Frey::Editor' => [ "switch_screen", "url_regex", "command" ], |
72 |
}; |
}; |
73 |
|
|
74 |
foreach my $class ( keys %$methods ) { |
foreach my $class ( keys %$methods ) { |