Test::Unit::Assertion::Exception3pm
A assertion for raised exceptions
Usage
require Test::Unit::Assertion::Exception;my $assert_raised =Test::Unit::Assertion::Exception->new('MyException');# This should succeed$assert_eq->do_assertion(sub { MyException->throw() });# This should fail$assert_eq->do_assertion(sub { });
Overview
Although the SYNOPSIS shows how you'd use Test::Unit::Assertion::Exception directly, it is more sensibly used indirectly via Test::Unit::Test::assert_raises(), which instantiates a "Test::Unit::Assertion::Exception".
Releases
11 releases since Debian 3.1 (Sarge); the text changed 6 times.