X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Getopt.git;a=blobdiff_plain;f=t%2F112_configfile_constructor_arg.t;h=8a30858fa693db2d31f7b5a1201dc8bd392c32da;hp=8cb13813abf71bf5df3cd67ff24a0cebe4c34506;hb=a45763205b528fd343a5e4882001f7253153a47a;hpb=ba2137c64703fef6794a46919394f9b768f77f9b diff --git a/t/112_configfile_constructor_arg.t b/t/112_configfile_constructor_arg.t index 8cb1381..8a30858 100644 --- a/t/112_configfile_constructor_arg.t +++ b/t/112_configfile_constructor_arg.t @@ -1,14 +1,12 @@ use strict; -use warnings; - -use Test::Requires - 'MooseX::SimpleConfig'; # skip all if not installed +use warnings FATAL => 'all'; # respect the configfile value passed into the constructor. +use Test::Requires 'MooseX::SimpleConfig'; # skip all if not installed use Test::More tests => 3; use Test::NoWarnings 1.04 ':early'; -use Path::Class; # exports file, dir +use Path::Tiny 0.009; # avoid warning if all we have installed is YAML or YAML::Syck - the user will # see this eventually when he actually uses MooseX::SimpleConfig in his own @@ -28,12 +26,12 @@ $Config::Any::YAML::NO_YAML_XS_WARNING = 1; } { - my $configfile = file(qw(t 112_configfile_constructor_arg.yml))->stringify; + my $configfile = path(qw(t 112_configfile_constructor_arg.yml))->stringify; my $obj = Foo->new_with_options(configfile => $configfile); is( - $obj->configfile, + path($obj->configfile), $configfile, 'configfile value is used from the constructor', );