diff options
| author | franck cuny <franck@lumberjaph.net> | 2010-02-14 18:00:33 +0100 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2010-02-14 18:00:33 +0100 |
| commit | 81aab6d1a8fdd1334792bffd703d35a81771e772 (patch) | |
| tree | fa9782f995401cbb2b8bdb4c6cc5d9ef2ed84002 /t/11_protected_method.t | |
| parent | POD and confess (diff) | |
| download | moosex-privacy-81aab6d1a8fdd1334792bffd703d35a81771e772.tar.gz | |
update tests
Diffstat (limited to '')
| -rw-r--r-- | t/11_protected_method.t | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/t/11_protected_method.t b/t/11_protected_method.t index 13e03e1..3618069 100644 --- a/t/11_protected_method.t +++ b/t/11_protected_method.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More tests => 5; use Test::Exception; { @@ -26,17 +26,6 @@ use Test::Exception; my $self = shift; return $self->bar; } - - sub add_public_method { - my $self = shift; - $self->meta->add_method( - 'public_foo', - sub { - $self->protected_meta_method; - } - ); - } - } my $foo = Foo->new(); @@ -50,15 +39,5 @@ is $bar->baz(), 'baz', "... got the good value from &bar"; is scalar @{ $foo->meta->local_protected_methods }, 1, '... got one protected method'; -my $protected_method = Class::MOP::Method->wrap( - sub { return 23 }, - name => 'protected_meta_method', - package_name => 'Foo' -); - -$foo->meta->add_protected_method($protected_method); -dies_ok { $foo->protected_meta_method } '... can\'t call the protected method'; -$bar->add_public_method; -is $bar->public_foo, 23, '... call protected method via public method'; |
