{{$NEXT}}
- converted uses of Path::Class to Path::Tiny (Karen Etheridge)
- removed use of deprecated Class::MOP::load_class
+ - converted uses of Test::Exception to Test::Fatal
0.03 Sat Jun 26 23:19:41 CDT 2010
- modified verification of RunnableClass values to use
use strict;
use warnings;
-use Test::Exception;
+use Test::Fatal;
use Test::More tests => 9;
use MooseX::Runnable::Invocation;
ok $invocation, 'class is instantiatable';
my $code;
- lives_ok {
+ is exception {
$code = $invocation->run('--foo', '42', 0);
- } 'run lived';
+ }, undef, 'run lived';
is $foo, '42', 'got foo from cmdline';
use strict;
use warnings;
-use Test::Exception;
+use Test::Fatal;
use Test::More tests => 8;
use ok 'MooseX::Runnable';
ok $invocation;
my $code;
-lives_ok {
+is exception {
$code = $invocation->run(1,2,3);
-} 'run lived';
+}, undef, 'run lived';
is $code, 6, 'run worked';
ok $invocation;
-lives_ok {
+is exception {
$code = $invocation->run(1,2,3);
-} 'run lived';
+}, undef, 'run lived';
is $code, 0, 'run worked, and plugin changed the return code';
use strict;
use warnings;
-use Test::Exception;
+use Test::Fatal;
use Test::More tests => 7;
use MooseX::Runnable::Invocation;
}
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 => {
'+Plugin2' => [],
},
);
-} 'two plugins with args compose OK';
+}, undef, 'two plugins with args compose OK';