X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=t%2F022-init-arg.t;h=559c3b90bd39ee8b03feeb7d94f65ba4fa98ecf1;hp=0bfc783f97a9e08724bd32f57b90aa31813e5e31;hb=f3c1ccc818bb5c50c50e17b9141b91c09b077b04;hpb=3645b3164ce4e4fafa8ee65c515281175da0efe7 diff --git a/t/022-init-arg.t b/t/022-init-arg.t index 0bfc783..559c3b9 100644 --- a/t/022-init-arg.t +++ b/t/022-init-arg.t @@ -16,13 +16,13 @@ do { my $object = Class->new; is($object->name, 'default', 'accessor uses attribute name'); -is($object->{name}, undef, 'nothing in object->{attribute name}!'); -is($object->{key}, 'default', 'value is in object->{init_arg}'); +is($object->{key}, undef, 'nothing in object->{init_arg}!'); +is($object->{name}, 'default', 'value is in object->{name}'); my $object2 = Class->new(name => 'name', key => 'key'); -is($object2->name, 'key', 'attribute value is from init_arg'); -is($object2->{name}, undef, 'no value for the attribute name'); -is($object2->{key}, 'key', 'value is from init_arg parameter'); +is($object2->name, 'name', 'attribute value is from name'); +is($object2->{key}, undef, 'no value for the init_arg'); +is($object2->{name}, 'name', 'value is in key from name'); my $attr = $object2->meta->get_attribute('name'); ok($attr, 'got the attribute object by name (not init_arg)');