X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F018-multiattr-has.t;h=8458e89041550a1916d285b278797966231fc450;hb=6cc6c673f9175314c395c60b894322e6f584d963;hp=8fb97f063f9b7455ac2d10922d9504b921c7e7ce;hpb=f89acace2fa0fd5e6b8c4ac40ab1794f1ca62887;p=gitmo%2FMouse.git diff --git a/t/018-multiattr-has.t b/t/018-multiattr-has.t index 8fb97f0..8458e89 100644 --- a/t/018-multiattr-has.t +++ b/t/018-multiattr-has.t @@ -8,17 +8,18 @@ do { package Class; use Mouse; - has [qw/a b c/] => ( - is => 'rw', - trigger => sub { - my ($self, $value, $attr) = @_; - $trigger{$attr->name}++; - }, - ); + for my $attr (qw/a b c/) { + has $attr => ( + is => 'rw', + trigger => sub { + $trigger{$attr}++; + }, + ); + } }; can_ok(Class => qw/a b c/); -is(keys %{ Class->meta->get_attribute_map }, 3, "three attributes created"); +is_deeply([sort Class->meta->get_attribute_list], [sort qw/a b c/], "three attributes created"); Class->new(a => 1, b => 2); is_deeply(\%trigger, { a => 1, b => 1 }, "correct triggers called");