Fix changes description to accurately reflect the bug
[gitmo/Moose.git] / t / 020_attributes / 012_misc_attribute_tests.t
index 69614d8..80c2330 100644 (file)
@@ -3,11 +3,10 @@
 use strict;
 use warnings;
 
-use Test::More tests => 48;
+use Test::More;
 use Test::Exception;
 
 
-
 {
     {
         package Test::Attribute::Inline::Documentation;
@@ -17,7 +16,8 @@ use Test::Exception;
             documentation => q{
                 The 'foo' attribute is my favorite
                 attribute in the whole wide world.
-            }
+            },
+            is => 'bare',
         );
     }
 
@@ -227,7 +227,7 @@ use Test::Exception;
     is($foo_attr->predicate, "has_foo",  ".. and it's named has_foo");
 
     ok($_foo_attr->is_lazy, "_foo is lazy");
-    ok($_foo_attr->is_required, "_foo is required");
+    ok(!$_foo_attr->is_required, "lazy_build attributes are no longer automatically required");
     ok($_foo_attr->is_lazy_build, "_foo is lazy_build");
 
     ok($_foo_attr->has_clearer, "_foo has clearer");
@@ -256,8 +256,8 @@ use Test::Exception;
     use Moose;
 }
 
-lives_ok { OutOfClassTest::has('foo'); } 'create attr via direct sub call';
-lives_ok { OutOfClassTest->can('has')->('bar'); } 'create attr via can';
+lives_ok { OutOfClassTest::has('foo', is => 'bare'); } 'create attr via direct sub call';
+lives_ok { OutOfClassTest->can('has')->('bar', is => 'bare'); } 'create attr via can';
 
 ok(OutOfClassTest->meta->get_attribute('foo'), 'attr created from sub call');
 ok(OutOfClassTest->meta->get_attribute('bar'), 'attr created from can');
@@ -273,3 +273,5 @@ ok(OutOfClassTest->meta->get_attribute('bar'), 'attr created from can');
     }
 
 }
+
+done_testing;