From: Jonathan Rockway Date: Thu, 25 Jun 2009 22:12:57 +0000 (-0700) Subject: add test to ensure that two roles with conflicting (sub)methods can be used X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4fc441ce54c886ebb468f3a2e5bf6fe8f88f7553;p=gitmo%2FMooseX-Runnable.git add test to ensure that two roles with conflicting (sub)methods can be used --- diff --git a/t/invocation-plugin-initargs.t b/t/invocation-plugin-initargs.t index e8f5996..900f9c9 100644 --- a/t/invocation-plugin-initargs.t +++ b/t/invocation-plugin-initargs.t @@ -1,7 +1,7 @@ use strict; use warnings; use Test::Exception; -use Test::More tests => 6; +use Test::More tests => 7; use MooseX::Runnable::Invocation; @@ -30,6 +30,15 @@ my $initargs; 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( @@ -61,3 +70,13 @@ lives_ok { }, ); } 'argless + no args = ok'; + +lives_ok { + MooseX::Runnable::Invocation->new( + class => 'Class', + plugins => { + '+Plugin' => [], + '+Plugin2' => [], + }, + ); +} 'two plugins with args compose OK';