adding documentation slot to the attributes
[gitmo/Moose.git] / t / 071_misc_attribute_tests.t
index c28b4a7..3849d64 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 4;
+use Test::More tests => 6;
 use Test::Exception;
 
 BEGIN {
@@ -12,6 +12,30 @@ BEGIN {
 
 {
     {
+        package Test::Attribute::Inline::Documentation;
+        use Moose;
+
+        has 'foo' => (
+            documentation => q{
+                The 'foo' attribute is my favorite 
+                attribute in the whole wide world.
+            }
+        );
+    }
+    
+    my $foo_attr = Test::Attribute::Inline::Documentation->meta->get_attribute('foo');
+    
+    ok($foo_attr->has_documentation, '... the foo has docs');
+    is($foo_attr->documentation,
+            q{
+                The 'foo' attribute is my favorite 
+                attribute in the whole wide world.
+            },
+    '... got the foo docs');
+}
+
+{
+    {
         package Test::For::Lazy::TypeConstraint;
         use Moose;
         use Moose::Util::TypeConstraints;