From: John Napiorkowski Date: Mon, 3 Oct 2011 14:19:39 +0000 (-0400) Subject: added stub test for working on error messgaes0 X-Git-Tag: v0.28~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Types-Structured.git;a=commitdiff_plain;h=971c23b3ed01344983e22381e598fa77fc1fa1e4;hp=220f2fbb9e5b5a0bf23bd9839d8fc91ca8ac1b37 added stub test for working on error messgaes0 0 ) --- diff --git a/t/bug-incorrect-message.t b/t/bug-incorrect-message.t new file mode 100644 index 0000000..82b5100 --- /dev/null +++ b/t/bug-incorrect-message.t @@ -0,0 +1,43 @@ +use strict; +use warnings; +use Test::More; + +{ + package Test::MooseX::Types::Structured::IncorrectMessage; + + use Moose; + use MooseX::Types::Moose qw(Str Int); + use MooseX::Types::Structured qw(Tuple Dict); + use MooseX::Types -declare => [qw(WrongMessage MyInt)]; + + subtype MyInt, + as Int, + message { 'Oh, my Int!' }; + + subtype WrongMessage, + as Dict[name=>Str, age=>MyInt]; + + has 'person' => ( + is => 'rw', + required => 1, + isa => WrongMessage, + ); +} + +my %init_args = ( + person => { + name => 'a', + age => 'v', + }, +); + +SKIP: { + skip 'Deeper Error Messges not yet supported', 1,1; + + ok( + Test::MooseX::Types::Structured::IncorrectMessage->new(%init_args), + 'Made a class', + ); +} + +done_testing;