6 use Test::More no_plan => 1;
9 use_ok('MooseX::AttributeHelpers');
17 metaclass => 'Collection',
20 default => sub { [] },
22 'push' => 'add_options',
23 'pop' => 'remove_last_option',
28 my $stuff = Stuff->new();
29 isa_ok($stuff, 'Stuff');
31 is_deeply($stuff->options, [], '... no options yet');
33 $stuff->add_options(1, 2, 3);
34 is_deeply($stuff->options, [1, 2, 3], '... got options now');
36 $stuff->add_options(10, 15);
37 is_deeply($stuff->options, [1, 2, 3, 10, 15], '... got more options now');
39 is($stuff->remove_last_option, 15, '... removed the last option');
41 is_deeply($stuff->options, [1, 2, 3, 10], '... got diff options now');