use strict;
use warnings;
-use Test::More tests => 19;
+use Test::More tests => 20;
use Test::Exception;
use Class::MOP;
}
);
+ ::throws_ok(
+ sub {
+ CheckingAccount->meta->add_before_method_modifier(
+ 'does_not_exist' => sub { } );
+ },
+ qr/\QThe method 'does_not_exist' was not found in the inheritance hierarchy for CheckingAccount/
+ );
+
::ok( CheckingAccount->meta->has_method('withdraw'),
'... checking account now has a withdraw method' );
::isa_ok( CheckingAccount->meta->get_method('withdraw'),