From: Karen Etheridge Date: Wed, 26 Dec 2012 01:30:47 +0000 (-0800) Subject: allow tests to run without warnings even if YAML::XS is not installed X-Git-Tag: v0.49~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ba2137c64703fef6794a46919394f9b768f77f9b;p=gitmo%2FMooseX-Getopt.git allow tests to run without warnings even if YAML::XS is not installed We could instead just add YAML::XS to the Test::Requires list, but (so long as Config::Any::YAML continues to support YAML/YAML::Syck) this route lets us test the MooseX::SimpleConfig path on more systems. --- diff --git a/Changes b/Changes index 33f4ead..d3af2fe 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for Perl extension MooseX-Getopt {{$NEXT}} + - silence a warning in tests if the user does not have YAML::XS installed + (thanks for the report, Getty!) 0.48 2012-12-23 18:08:04 PST-0800 - documentation and tests amended to prefer usage of 'trait' over 'metaclass' diff --git a/t/112_configfile_constructor_arg.t b/t/112_configfile_constructor_arg.t index 9465ede..8cb1381 100644 --- a/t/112_configfile_constructor_arg.t +++ b/t/112_configfile_constructor_arg.t @@ -10,6 +10,12 @@ use Test::More tests => 3; use Test::NoWarnings 1.04 ':early'; use Path::Class; # exports file, dir +# 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; use Moose;