From: John Napiorkowski Date: Wed, 23 Jun 2010 17:20:12 +0000 (-0400) Subject: fixed tests for modern Moose, updated Makefile, a bit of cleanup to reboot project X-Git-Tag: 0.01~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=749cd2c4a457576c77beb7af6782308f26997c98;p=gitmo%2FMooseX-Dependent.git fixed tests for modern Moose, updated Makefile, a bit of cleanup to reboot project --- diff --git a/Makefile.PL b/Makefile.PL index d7537bd..da14559 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,30 +1,26 @@ use strict; use warnings; -use inc::Module::Install; +use inc::Module::Install 1.00; name 'MooseX-Dependent'; all_from 'lib/MooseX/Dependent.pm'; author 'John Napiorkowski '; -repository 'git://jules.scsys.co.uk/gitmo/MooseX-Dependent.git'; +repository 'git://git.moose.perl.org/MooseX-Dependent.git' + license 'perl'; -requires 'Moose' => '0.79'; -requires 'MooseX::Types' => '0.10'; +requires 'Moose' => '1.08'; +requires 'MooseX::Types' => '0.22'; requires 'Scalar::Util' => '1.19'; -requires 'Devel::PartialDump' => '0.07'; -requires 'Data::Dump' => '1.14'; -requires 'Digest::MD5' => '2.38'; +requires 'Devel::PartialDump' => '0.13'; +requires 'Data::Dump' => '1.17'; +requires 'Digest::MD5' => '2.39'; -build_requires 'Test::More' => '0.86'; -build_requires 'Test::Exception' => '0.27'; +build_requires 'Test::More' => '0.94'; +build_requires 'Test::Exception' => '0.29'; auto_install; tests_recursive; WriteAll; -package MY; - -sub postamble { - return "README:\tpod2text \$< > \$@"; -} diff --git a/t/01-types-dependent.t b/t/01-types-dependent.t index 3429d11..2417184 100644 --- a/t/01-types-dependent.t +++ b/t/01-types-dependent.t @@ -24,8 +24,8 @@ use Test::More tests=>79; { is Dependent->name, 'MooseX::Dependent::Types::Dependent', 'Dependent has expected name'; - is Dependent->get_message, - "Validation failed for 'MooseX::Dependent::Types::Dependent' failed with value undef", + like Dependent->get_message, + qr/Validation failed for 'MooseX::Dependent::Types::Dependent' with value undef/, 'Got Expected Message'; ok Dependent->equals(Dependent), @@ -59,8 +59,8 @@ use Test::More tests=>79; { is SubDependent->name, 'main::SubDependent', 'Dependent has expected name'; - is SubDependent->get_message, - "Validation failed for 'main::SubDependent' failed with value undef", + like SubDependent->get_message, + qr/Validation failed for 'main::SubDependent' with value undef/, 'Got Expected Message'; ok SubDependent->equals(SubDependent), @@ -105,8 +105,8 @@ use Test::More tests=>79; { ok !IntLessThan->check('aaa'), '"aaa" is not an integer'; - is IntLessThan->validate('aaa'), - "Validation failed for 'main::EvenInt' failed with value aaa", + like IntLessThan->validate('aaa'), + qr/Validation failed for 'main::EvenInt' with value aaa/, 'Got expected error messge for "aaa"'; ok !IntLessThan->check(1), @@ -127,8 +127,8 @@ use Test::More tests=>79; { ok IntLessThan->check(10), '10 greater than 5 (and even)'; - is IntLessThan->validate(1), - "Validation failed for 'main::EvenInt' failed with value 1", + like IntLessThan->validate(1), + qr/Validation failed for 'main::EvenInt' with value 1/, 'error message is correct'; is IntLessThan->name, 'main::IntLessThan', @@ -274,7 +274,7 @@ use Test::More tests=>79; { CHECKPARAM: { eval { GreatThen5andEvenIntNot54or64([54])->check(32) }; like $@, - qr/Validation failed for 'main::IntNot54' failed with value 54/, + qr/Validation failed for 'main::IntNot54' with value 54/, 'Got Expected Error'; }