use strict;
use warnings;
-use Test::More tests => 14;
+use Test::More;
use Test::Exception;
{
package Foo;
use metaclass;
sub foo {}
+ Foo->meta->add_attribute('bar');
}
sub check_meta_sanity {
isa_ok($meta, 'Class::MOP::Class');
is($meta->name, 'Foo');
ok($meta->has_method('foo'));
+ ok($meta->has_attribute('bar'));
}
can_ok('Foo', 'meta');
throws_ok {
$meta->reinitialize($meta->new_object);
} qr/You must pass a package name or an existing Class::MOP::Package instance/;
+
+done_testing;