no more _role_meta crapsvk status!
[gitmo/Moose.git] / t / 040_meta_role.t
index 89403a7..df706f3 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 28;
+use Test::More tests => 23;
 use Test::Exception;
 
 BEGIN {  
@@ -18,12 +18,9 @@ BEGIN {
     sub foo { 'FooRole::foo' }
 }
 
-my $foo_role = Moose::Meta::Role->new(
-    role_name => 'FooRole'
-);
+my $foo_role = Moose::Meta::Role->initialize('FooRole');
 isa_ok($foo_role, 'Moose::Meta::Role');
-
-isa_ok($foo_role->role_meta, 'Class::MOP::Class');
+isa_ok($foo_role, 'Class::MOP::Module');
 
 is($foo_role->name, 'FooRole', '... got the right name of FooRole');
 is($foo_role->version, '0.01', '... got the right version of FooRole');
@@ -93,21 +90,3 @@ is_deeply(
 ok(!$foo_role->has_attribute('bar'), '... FooRole does not have the bar attribute');
 ok($foo_role->has_attribute('baz'), '... FooRole does still have the baz attribute');
 
-# method modifiers
-
-ok(!$foo_role->has_method_modifiers('before' => 'boo'), '... no boo:before modifier');
-
-my $method = sub { "FooRole::boo:before" };
-lives_ok {
-    $foo_role->add_method_modifier('before' => (
-        'boo' => $method
-    ));
-} '... added a method modifier okay';
-
-ok($foo_role->has_method_modifiers('before' => 'boo'), '... now we have a boo:before modifier');
-is(($foo_role->get_method_modifiers('before' => 'boo'))[0], $method, '... got the right method back');
-
-is_deeply(
-    [ $foo_role->get_method_modifier_list('before') ],
-    [ 'boo' ],
-    '... got the right list of before method modifiers');