use strict;
use warnings;
use Test::Exception;
-use Test::More tests => 6;
+use Test::More tests => 7;
use MooseX::Runnable::Invocation;
use Moose::Role;
}
+{ package Plugin2;
+ use Moose::Role;
+ with 'MooseX::Runnable::Invocation::Plugin::Role::CmdlineArgs';
+
+ sub _build_initargs_from_cmdline {
+ return { init => 'fails' };
+ }
+}
+
my $i;
lives_ok {
$i = MooseX::Runnable::Invocation->new(
},
);
} 'argless + no args = ok';
+
+lives_ok {
+ MooseX::Runnable::Invocation->new(
+ class => 'Class',
+ plugins => {
+ '+Plugin' => [],
+ '+Plugin2' => [],
+ },
+ );
+} 'two plugins with args compose OK';