6 use Test::More tests => 54;
14 my $attr = Class::MOP::Attribute->new('$test');
15 is($attr->meta, Class::MOP::Attribute->meta, '... instance and class both lead to the same meta');
19 my $meta = Class::MOP::Attribute->meta();
20 isa_ok($meta, 'Class::MOP::Class');
26 initialize_instance_slot
30 has_writer writer get_write_method
31 has_reader reader get_read_method
32 has_predicate predicate
36 has_default default is_default_a_coderef
45 attach_to_class detach_from_class
58 [ sort $meta->get_method_list ],
60 '... our method list matches');
62 foreach my $method_name (@methods) {
63 ok($meta->has_method($method_name), '... Class::MOP::Attribute->has_method(' . $method_name . ')');
77 '@!associated_methods',
81 [ sort $meta->get_attribute_list ],
83 '... our attribute list matches');
85 foreach my $attribute_name (@attributes) {
86 ok($meta->has_attribute($attribute_name), '... Class::MOP::Attribute->has_attribute(' . $attribute_name . ')');
89 # We could add some tests here to make sure that
90 # the attribute have the appropriate
91 # accessor/reader/writer/predicate combinations,
92 # but that is getting a little excessive so I
93 # wont worry about it for now. Maybe if I get