Hi All,
is there any simple way of achieving this:
sub test_foo
{
my $self = shift;
my $obj_to_test = ObjToTest->new('yadda', 1);
# This is wrong in so many different ways, and only intended to
convey what
# I'd like to do
$self->assert_dies($obj_to_test->some_method('bobba', 2),
'my_die_message');
}
In other words - I want to check that a specific object method dies with
a specific message.
There are examples included using ExceptionChecker.pm and WillDie.pm,
but I can't seem to achieve the above.
Thanks in advance for any pointers
stefan
--
Stefan Kruger
Future Publishing Limited (registered company number 2008885) is a wholly owned
subsidiary of Future plc (registered company number 3757874), both of which are
incorporated in England and Wales and share the same registered address at
Beauford Court, 30 Monmouth Street, Bath BA1 2BW.
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to which they are addressed. If
you have received this email in error please reply to this email and then
delete it. Please note that any views or opinions presented in this email are
solely those of the author and do not necessarily represent those of Future.
The recipient should check this email and any attachments for the presence of
viruses. Future accepts no liability for any damage caused by any virus
transmitted by this email.
Future may regularly and randomly monitor outgoing and incoming emails and
other telecommunications on its email and telecommunications systems. By
replying to this email you give your consent to such monitoring.
*****
Save resources: think before you print.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Perlunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perlunit-users