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=3501d34f265484b05d47ede11c7c0837e71a8585;hpb=df491f72df4e5e7d9edda466a9408528c843ba33;p=gitmo%2FMooseX-AlwaysCoerce.git diff --git a/t/02-mx-m-s.t b/t/02-mx-m-s.t index 3501d34..0f1d071 100644 --- a/t/02-mx-m-s.t +++ b/t/02-mx-m-s.t @@ -1,19 +1,14 @@ -#!/usr/bin/env perl use strict; use warnings; use Test::More; -use Test::Exception; - -eval { require MooseX::Method::Signatures }; -plan skip_all => "No MooseX::Method::Signatures" if $@; - -plan tests => 2; { package MyClass; use Moose; - use MooseX::Method::Signatures; + use Test::Requires { + 'MooseX::Method::Signatures' => 0.01, + }; use MooseX::AlwaysCoerce; use Moose::Util::TypeConstraints; @@ -29,8 +24,18 @@ plan tests => 2; } } +use Test::Fatal; +use if $ENV{AUTHOR_TESTING}, 'Test::Warnings'; + ok( (my $instance = MyClass->new), 'instance' ); -lives_and { - is $instance->foo(foo => "text", bar => 42), '4 42'; -} 'method called with coerced and uncoerced parameters'; +TODO: { + local $TODO = 'need rafl to help with implementation'; + + is( exception { + is $instance->foo(foo => "text", bar => 42), '4 42'; + }, undef, 'method called with coerced and uncoerced parameters' ) + or todo_skip 'is() test never ran', 1; +} + +done_testing;