From: Karen Etheridge Date: Sat, 13 Oct 2012 23:01:33 +0000 (-0700) Subject: remove this use of eval X-Git-Tag: v0.18~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9381ff3cc1d01c52adaa24d0cf720fdd486594ab;p=gitmo%2FMooseX-AlwaysCoerce.git remove this use of eval --- diff --git a/t/02-mx-m-s.t b/t/02-mx-m-s.t index 9b36d77..3209e64 100644 --- a/t/02-mx-m-s.t +++ b/t/02-mx-m-s.t @@ -2,19 +2,14 @@ use strict; use warnings; -use Test::More tests => 3; - -use Test::Requires { - 'MooseX::Method::Signatures' => 0.01, -}; - -use Test::Fatal; -use Test::NoWarnings; +use Test::More; { package MyClass; use Moose; - use MooseX::Method::Signatures; + use Test::Requires { + 'MooseX::Method::Signatures' => 0.01, + }; use MooseX::AlwaysCoerce; use Moose::Util::TypeConstraints; @@ -30,6 +25,10 @@ use Test::NoWarnings; } } +use Test::Fatal; +use Test::NoWarnings; +plan tests => 4; + ok( (my $instance = MyClass->new), 'instance' ); TODO: { @@ -37,5 +36,6 @@ TODO: { is( exception { is $instance->foo(foo => "text", bar => 42), '4 42'; - }, undef, 'method called with coerced and uncoerced parameters' ); + }, undef, 'method called with coerced and uncoerced parameters' ) + or todo_skip 'is() test never ran', 1; } diff --git a/t/04-parameterized-roles.t b/t/04-parameterized-roles.t index 158362e..af8b6ea 100644 --- a/t/04-parameterized-roles.t +++ b/t/04-parameterized-roles.t @@ -9,6 +9,9 @@ use Test::Requires { 'MooseX::Role::Parameterized' => 0.25, }; +plan tests => 12; +use Test::NoWarnings; + eval <<'EOF'; package Role; use MooseX::Role::Parameterized 0.25; @@ -45,8 +48,6 @@ eval <<'EOF'; EOF -plan tests => 12; -eval 'use Test::NoWarnings'; ok( (my $instance = MyClass->new), 'instance' );