X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F02-mx-m-s.t;h=0f1d0718861f600300230a9b31b9a7b6e14a16b9;hb=bb4a98dc91f85fd0f14f85fdcb7c620aecbd33de;hp=9b36d7795b58410bd605897ee6cfe696b5745581;hpb=dfab7c8b29f43615983ca90c1c4474554cebfaa6;p=gitmo%2FMooseX-AlwaysCoerce.git diff --git a/t/02-mx-m-s.t b/t/02-mx-m-s.t index 9b36d77..0f1d071 100644 --- a/t/02-mx-m-s.t +++ b/t/02-mx-m-s.t @@ -1,20 +1,14 @@ -#!/usr/bin/env perl 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 +24,9 @@ use Test::NoWarnings; } } +use Test::Fatal; +use if $ENV{AUTHOR_TESTING}, 'Test::Warnings'; + ok( (my $instance = MyClass->new), 'instance' ); TODO: { @@ -37,5 +34,8 @@ 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; } + +done_testing;