code cleanup to WebGUI::Paths

This commit is contained in:
Graham Knop 2010-03-18 15:23:05 -05:00
parent 6cbdc3272c
commit a484fb126d
2 changed files with 19 additions and 8 deletions

View file

@ -2,10 +2,10 @@ use 5.010;
use strict;
use warnings;
use Test::More tests => 3;
use Test::More;
use WebGUI::Paths;
can_ok 'WebGUI::Paths', qw(
my @pathMethods = qw(
configBase
logConfig
spectreConfig
@ -17,6 +17,8 @@ can_ok 'WebGUI::Paths', qw(
defaultCreateSQL
var
);
can_ok 'WebGUI::Paths', @pathMethods;
ok !(grep { WebGUI::Paths->can($_) } qw(
croak
realpath
@ -35,3 +37,10 @@ ok !(grep { WebGUI::Paths->can($_) } qw(
my @configs = WebGUI::Paths->siteConfigs;
ok !(\@configs ~~ WebGUI::Paths->spectreConfig), 'Spectre config not listed in configs';
for my $method (@pathMethods) {
my $return = WebGUI::Paths->$method;
ok $return, "$method returns a path";
}
done_testing;