From: Robert Buels Date: Thu, 25 Jun 2009 20:18:57 +0000 (-0700) Subject: migrated a few moose::attributehelpers tests X-Git-Tag: 0.89_02~137 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=90f26642b7c2f311e72a562441aaa7e125beb18e;p=gitmo%2FMoose.git migrated a few moose::attributehelpers tests --- diff --git a/t/070_attribute_helpers/207_trait_string.t b/t/070_attribute_helpers/207_trait_string.t index e3c0075..84f28d5 100644 --- a/t/070_attribute_helpers/207_trait_string.t +++ b/t/070_attribute_helpers/207_trait_string.t @@ -19,16 +19,16 @@ BEGIN { is => 'rw', isa => 'Str', default => sub { '' }, - provides => { - inc => 'inc_string', - append => 'append_string', - prepend => 'prepend_string', - match => 'match_string', - replace => 'replace_string', - chop => 'chop_string', - chomp => 'chomp_string', - clear => 'clear_string', - } + handles => { + inc_string => 'inc', + append_string => 'append', + prepend_string => 'prepend', + match_string => 'match', + replace_string => 'replace', + chop_string => 'chop', + chomp_string => 'chomp', + clear_string => 'clear', + }, ); } @@ -77,14 +77,14 @@ is($string->helper_type, 'Str', '... got the expected helper type'); is($string->type_constraint->name, 'Str', '... got the expected type constraint'); -is_deeply($string->provides, { - inc => 'inc_string', - append => 'append_string', - prepend => 'prepend_string', - match => 'match_string', - replace => 'replace_string', - chop => 'chop_string', - chomp => 'chomp_string', - clear => 'clear_string', +is_deeply($string->handles, { + inc_string => 'inc', + append_string => 'append', + prepend_string => 'prepend', + match_string => 'match', + replace_string => 'replace', + chop_string => 'chop', + chomp_string => 'chomp', + clear_string => 'clear', }, '... got the right provides methods'); diff --git a/t/070_attribute_helpers/208_trait_bool.t b/t/070_attribute_helpers/208_trait_bool.t index 5b9e7a8..5462d90 100644 --- a/t/070_attribute_helpers/208_trait_bool.t +++ b/t/070_attribute_helpers/208_trait_bool.t @@ -14,11 +14,12 @@ use Moose::AttributeHelpers; is => 'rw', isa => 'Bool', default => sub { 0 }, - provides => { - set => 'illuminate', - unset => 'darken', - toggle => 'flip_switch', - not => 'is_dark' + handles => { + illuminate => 'set', + darken => 'unset', + flip_switch => 'toggle', + is_dark => 'not', + }, } ) }