From: Graham Knop Date: Thu, 18 Jul 2013 07:35:05 +0000 (-0400) Subject: style updates for test X-Git-Tag: v1.003001~35 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=da4b56dad08e2d82a1789b0d8733a53213473ff8;p=gitmo%2FMoo.git style updates for test --- diff --git a/t/has-array.t b/t/has-array.t index 3d2d91f..277c86e 100644 --- a/t/has-array.t +++ b/t/has-array.t @@ -1,21 +1,19 @@ -use Test::More tests => 4; +use strictures; +use Test::More; +use Test::Fatal; -ok(eval { +is(exception { package Local::Test::Role1; use Moo::Role; has [qw/ attr1 attr2 /] => (is => 'ro'); - 1; -}, 'has \@attrs works in roles') - or diag "EVAL FAILED: $@"; +}, undef, 'has \@attrs works in roles'); -ok eval { +is(exception { package Local::Test::Class1; use Moo; with 'Local::Test::Role1'; has [qw/ attr3 attr4 /] => (is => 'ro'); - 1; -}, 'has \@attrs works in classes' - or diag "EVAL FAILED: $@"; +}, undef, 'has \@attrs works in classes'); my $obj = new_ok 'Local::Test::Class1' => [ attr1 => 1, @@ -28,3 +26,5 @@ can_ok( $obj, qw( attr1 attr2 attr3 attr4 ), ); + +done_testing;