renamed helper_type => _helper_type
[gitmo/Moose.git] / t / 070_attribute_helpers / 203_trait_hash.t
index 9d5d862..b6d8553 100644 (file)
@@ -8,16 +8,16 @@ use Test::Exception;
 use Test::Moose 'does_ok';
 
 BEGIN {
-    use_ok('MooseX::AttributeHelpers');
+    use_ok('Moose::AttributeHelpers');
 }
 
 {
     package Stuff;
     use Moose;
-    use MooseX::AttributeHelpers;
+    use Moose::AttributeHelpers;
 
     has 'options' => (
-        traits    => [qw/MooseX::AttributeHelpers::Trait::Collection::Hash/],
+        traits    => [qw/Collection::Hash/],
         is        => 'ro',
         isa       => 'HashRef[Str]',
         default   => sub { {} },
@@ -133,21 +133,21 @@ dies_ok {
 ## test the meta
 
 my $options = $stuff->meta->get_attribute('options');
-does_ok($options, 'MooseX::AttributeHelpers::Trait::Collection::Hash');
+does_ok($options, 'Moose::AttributeHelpers::Trait::Collection::Hash');
 
 is_deeply($options->handles, {
-   'add_options'           => 'push',
-   'remove_last_option'    => 'pop',
-   'remove_first_option'   => 'shift',
-   'insert_options'        => 'unshift',
-   'get_option_at'         => 'get',
-   'set_option_at'         => 'set',
-   'num_options'           => 'count',
-   'has_options'           => 'empty',
-   'clear_options'         => 'clear',
-   'splice_options'        => 'splice',
-   'sort_options_in_place' => 'sort_in_place',
-   'option_accessor'       => 'accessor',
+    'set_option'       => 'set',
+    'get_option'       => 'get',
+    'has_options'      => 'empty',
+    'num_options'      => 'count',
+    'clear_options'    => 'clear',
+    'delete_option'    => 'delete',
+    'has_option'       => 'exists',
+    'is_defined'       => 'defined',
+    'option_accessor'  => 'accessor',
+    'key_value'        => 'kv',
+    'options_elements' => 'elements',
+    'quantity' => [ accessor => ['quantity'] ],
 }, '... got the right handles mapping');
 
 is($options->type_constraint->type_parameter, 'Str', '... got the right container type');