1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#!/usr/bin/perl
use warnings;
use strict;
use Test::More;
use base 'DBIx::Class::Schema::Config';
use File::HomeDir;
my $wanted = [ './dbic', "/etc/dbic" ];
# add $HOME/.dbic, if $HOME exists, and as the penultimate element
my $home = File::HomeDir->my_home;
splice @{$wanted}, -1, 0, "$home/.dbic" if defined $home;
is_deeply(
__PACKAGE__->config_paths,
$wanted,
"_config_paths looks sane.");
__PACKAGE__->config_paths( [ ( './this', '/var/www/that' ) ] );
is_deeply(
__PACKAGE__->config_paths,
[ './this', '/var/www/that' ],
"_config_paths can be modified.");
done_testing;
|