Move attr arg even/odd test to Moose::Meta::Attribute
[gitmo/Moose.git] / t / attributes / misc_attribute_tests.t
index c3d691c..01f6c90 100644 (file)
@@ -260,13 +260,14 @@ ok(OutOfClassTest->meta->get_attribute('bar'), 'attr created from can');
 
 
 {
-    {
-        package Foo;
-        use Moose;
-
-        ::like( ::exception { has 'foo' => ( 'ro', isa => 'Str' ) }, qr/^Usage/, 'has throws error with odd number of attribute options' );
-    }
+    package Foo;
+    use Moose;
 
+    ::like(
+        ::exception{ has 'foo' => ( 'ro', isa => 'Str' ) },
+        qr/^Defining an attribute/,
+        'has throws error with odd number of attribute options'
+    );
 }
 
 done_testing;