Same API as Moose for Mouse::Meta::Attribute->new
[gitmo/Mouse.git] / t / 800_shikabased / 008-create_class.t
index 99143f3..1566d90 100644 (file)
@@ -7,6 +7,7 @@ use Test::Exception;
 # error handling
 throws_ok {
     Mouse::Meta::Class->create(
+        "ClassName",
         superclasses => "foo"
     );
 } qr/You must pass an ARRAY ref of superclasses/;
@@ -14,12 +15,14 @@ throws_ok {
 
 throws_ok {
     Mouse::Meta::Class->create(
+        "ClassName",
         attributes => "foo"
     );
 } qr/You must pass an ARRAY ref of attributes/;
 
 throws_ok {
     Mouse::Meta::Class->create(
+        "ClassName",
         methods => "foo"
     );
 } qr/You must pass a HASH ref of methods/;
@@ -39,7 +42,10 @@ isa_ok(
         superclasses => [ "FooBar", "Mouse::Object" ],
         attributes   => [
             Mouse::Meta::Attribute->new(
-                name => "foo", is => "rw", default => "yay"
+                "foo" => (
+                    is => "rw",
+                    default => "yay",
+                ),
             )
         ],
         methods => {