5 'MooseX::SimpleConfig'; # skip all if not installed
7 # respect the configfile value passed into the constructor.
9 use Test::More tests => 3;
10 use Test::NoWarnings 1.04 ':early';
11 use Path::Class; # exports file, dir
13 # avoid warning if all we have installed is YAML or YAML::Syck - the user will
14 # see this eventually when he actually uses MooseX::SimpleConfig in his own
16 use Config::Any::YAML;
17 $Config::Any::YAML::NO_YAML_XS_WARNING = 1;
22 with 'MooseX::Getopt', 'MooseX::SimpleConfig';
25 is => 'ro', isa => 'Str',
26 default => 'foo default',
31 my $configfile = file(qw(t 112_configfile_constructor_arg.yml))->stringify;
33 my $obj = Foo->new_with_options(configfile => $configfile);
38 'configfile value is used from the constructor',
43 'value is read in from the config file',