From: Karen Etheridge Date: Tue, 25 Dec 2012 08:34:17 +0000 (-0800) Subject: collapse these tests together X-Git-Tag: v0.49~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b3bb80f844ab588c96b655aece9ec05a98fe8f88;p=gitmo%2FMooseX-Getopt.git collapse these tests together --- diff --git a/t/008_configfromfile.t b/t/008_configfromfile.t index d24296e..c40fcc6 100644 --- a/t/008_configfromfile.t +++ b/t/008_configfromfile.t @@ -83,12 +83,10 @@ use Test::Requires 'MooseX::ConfigFromFile'; { local @ARGV = qw( --required_from_argv 1 ); - if ($Getopt::Long::Descriptive::VERSION >= 0.091) { - like exception { App->new_with_options }, qr/Mandatory parameter 'required_from_config' missing/; - } - else { - like exception { App->new_with_options }, qr/Required option missing: required_from_config/; - } + like exception { App->new_with_options }, + ($Getopt::Long::Descriptive::VERSION >= 0.091 + ? qr/Mandatory parameter 'required_from_config' missing/ + : qr/Required option missing: required_from_config/); { my $app = App::DefaultConfigFile->new_with_options; @@ -157,12 +155,10 @@ use Test::Requires 'MooseX::ConfigFromFile'; # Required arg not supplied from cmdline { local @ARGV = qw( --configfile /notused ); - if ($Getopt::Long::Descriptive::VERSION >= 0.091) { - like exception { App->new_with_options }, qr/Mandatory parameter 'required_from_argv' missing/; - } - else { - like exception { App->new_with_options }, qr/Required option missing: required_from_argv/; - } + like exception { App->new_with_options }, + ($Getopt::Long::Descriptive::VERSION >= 0.091 + ? qr/Mandatory parameter 'required_from_argv' missing/ + : qr/Required option missing: required_from_argv/); } # Config file value overriden from cmdline