X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Finvocation-plugin-initargs.t;h=9e1987bec7c81dd28456d7dcea3a346715559aa7;hb=5b9208740abb7307813e18d172192f7683ff519d;hp=900f9c9e722d7c788a4c4b016135abe67c0a2f0d;hpb=9c750ab12855bb02c5f506f9d8598271b620194e;p=gitmo%2FMooseX-Runnable.git diff --git a/t/invocation-plugin-initargs.t b/t/invocation-plugin-initargs.t index 900f9c9..9e1987b 100644 --- a/t/invocation-plugin-initargs.t +++ b/t/invocation-plugin-initargs.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::Exception; +use Test::Fatal; use Test::More tests => 7; use MooseX::Runnable::Invocation; @@ -40,38 +40,38 @@ my $initargs; } my $i; -lives_ok { +is exception { $i = MooseX::Runnable::Invocation->new( class => 'Class', plugins => { '+Plugin' => [qw/foo bar baz/], }, ); -} 'created invocation without dying'; +}, undef, 'created invocation without dying'; ok $i, 'created invocation ok'; ok $i->run, 'ran ok'; is $initargs, 'foo,bar,baz', 'got initargs'; -throws_ok { +like exception { MooseX::Runnable::Invocation->new( class => 'Class', plugins => { '+Argless' => ['args go here'], }, ); -} qr/Perhaps/, 'argless + args = error'; +}, qr/Perhaps/, 'argless + args = error'; -lives_ok { +is exception { MooseX::Runnable::Invocation->new( class => 'Class', plugins => { '+Argless' => [], }, ); -} 'argless + no args = ok'; +}, undef, 'argless + no args = ok'; -lives_ok { +is exception { MooseX::Runnable::Invocation->new( class => 'Class', plugins => { @@ -79,4 +79,4 @@ lives_ok { '+Plugin2' => [], }, ); -} 'two plugins with args compose OK'; +}, undef, 'two plugins with args compose OK';