X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F112_configfile_constructor_arg.t;h=d17c2d4b1aede09b211ba0cb47a990bccfe023ec;hb=e672789158a11f21f9e53b8d66dcfef5306f5973;hp=7b55a83a2ce716061e758aafcf0981e90f96d7ae;hpb=1c9973b6fd145c47387b3128f6ffcacdac6eb1ab;p=gitmo%2FMooseX-Getopt.git diff --git a/t/112_configfile_constructor_arg.t b/t/112_configfile_constructor_arg.t index 7b55a83..d17c2d4 100644 --- a/t/112_configfile_constructor_arg.t +++ b/t/112_configfile_constructor_arg.t @@ -1,12 +1,18 @@ use strict; use warnings; -use Test::Requires - 'MooseX::SimpleConfig'; # skip all if not installed - # respect the configfile value passed into the constructor. -use Test::More tests => 2; +use Test::Requires 'MooseX::SimpleConfig'; # skip all if not installed +use Test::More tests => 3; +use Test::NoWarnings 1.04 ':early'; +use Path::Tiny; + +# 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 +# code +use Config::Any::YAML; +$Config::Any::YAML::NO_YAML_XS_WARNING = 1; { package Foo; @@ -19,16 +25,13 @@ use Test::More tests => 2; ); } -TODO: { - local $TODO = "doh, this doesn't work!"; - - my $configfile = 't/112_configfile_constructor_arg.yml'; + 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', );