[Moose-commits] r7756 - Class-MOP/trunk/t

autarch at code2.0beta.co.uk autarch at code2.0beta.co.uk
Fri Feb 20 19:22:16 GMT 2009


Author: autarch
Date: 2009-02-20 11:22:15 -0800 (Fri, 20 Feb 2009)
New Revision: 7756

Modified:
   Class-MOP/trunk/t/017_add_method_modifier.t
Log:
Add a test for adding a method modifier to a method added after class was first defined


Modified: Class-MOP/trunk/t/017_add_method_modifier.t
===================================================================
--- Class-MOP/trunk/t/017_add_method_modifier.t	2009-02-20 18:23:31 UTC (rev 7755)
+++ Class-MOP/trunk/t/017_add_method_modifier.t	2009-02-20 19:22:15 UTC (rev 7756)
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 20;
+use Test::More tests => 21;
 use Test::Exception;
 
 use Class::MOP;
@@ -79,6 +79,11 @@
         'Class::MOP::Method::Wrapped' );
     ::isa_ok( BankAccount->meta->get_method('withdraw'),
         'Class::MOP::Method' );
+
+    CheckingAccount->meta->add_method( foo => sub { 'foo' } );
+    CheckingAccount->meta->add_before_method_modifier( foo => sub { 'wrapped' } );
+    ::isa_ok( CheckingAccount->meta->get_method('foo'),
+        'Class::MOP::Method::Wrapped' );
 }
 
 my $savings_account = BankAccount->new( balance => 250 );




More information about the Moose-commits mailing list