From: Shawn M Moore Date: Fri, 15 Jun 2012 18:17:19 +0000 (-0500) Subject: error -> message to match Moose::Exception X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2f74633b9793489f1274552e70b124e3be63aec5;p=gitmo%2FMoose.git error -> message to match Moose::Exception --- diff --git a/t/metaclasses/custom_error_class.t b/t/metaclasses/custom_error_class.t index 1769cb5..bf02251 100644 --- a/t/metaclasses/custom_error_class.t +++ b/t/metaclasses/custom_error_class.t @@ -12,7 +12,7 @@ use Test::Requires { use Moose; - has error => ( + has message => ( is => 'ro', isa => 'Str', required => 1, @@ -44,7 +44,7 @@ use Test::Requires { my ( $self, %params ) = @_; my $exception = My::Exception->new( - error => $params{message}, + message => $params{message}, line => $params{line}, file => $params{file}, package => $params{pack}, @@ -99,7 +99,7 @@ use Test::Requires { 'got exception object (immutable class)' ); is( - $error->error, 'Attribute (test1) is required', + $error->message, 'Attribute (test1) is required', 'got the right message (immutable class)' ); is( @@ -119,7 +119,7 @@ use Test::Requires { isa_ok( $error, 'My::Exception', 'got exception object (mutable class)' ); is( - $error->error, 'Attribute (test1) is required', + $error->message, 'Attribute (test1) is required', 'got the right message (mutable class)' ); }