9 use Test::More tests => 7;
12 my $autodoc = MooseX::AutoDoc->new;
13 my $meta = AutoDocTest1->meta;
14 my %attributes = map { $_ => $meta->get_attribute($_) }
15 $meta->get_attribute_list;
23 description => 'Optional read-only value'
26 my $spec = $autodoc->_attribute_info($attributes{attr1});
28 is_deeply($spec, $target);
37 description => 'Optional read-write value of type L<HashRef|Moose::Util::TypeConstraints>'
40 my $spec = $autodoc->_attribute_info($attributes{attr2});
42 is_deeply($spec, $target);
51 'description' => 'Optional read-write value of type L<ArrayRef[Str]|Moose::Util::TypeConstraints>'
54 my $spec = $autodoc->_attribute_info($attributes{attr3});
56 is_deeply($spec, $target);
65 'description' => 'Required read-write value of type L<ArrayRef[Str]|Moose::Util::TypeConstraints>'
68 my $spec = $autodoc->_attribute_info($attributes{attr4});
70 is_deeply($spec, $target);
79 'description' => 'Required read-write value of type L<ArrayRef[Str]|Moose::Util::TypeConstraints> that will be automatically dereferenced by the reader / accessor'
82 my $spec = $autodoc->_attribute_info($attributes{attr5});
84 is_deeply($spec, $target);
92 'predicate' => 'has_attr6',
93 'builder' => '_build_attr6',
94 'clearer' => 'clear_attr6'
97 'description' => 'Optional read-write lazy-building value'
100 my $spec = $autodoc->_attribute_info($attributes{attr6});
102 is_deeply($spec, $target);
111 'writer' => '_attr7',
112 'constructor key' => '-attr7',
115 'description' => 'Optional value'
118 my $spec = $autodoc->_attribute_info($attributes{attr7});
120 is_deeply($spec, $target);