Skip to content

Added test type for asserting a thrown exception #6

Merged
merged 1 commit into from Oct 10, 2012

2 participants

@epixa
epixa commented Oct 9, 2012

Sometimes it is useful to test functionality that throws known exceptions given
specific conditions. The only existing solution was to pass to ok() an anonymous
function that manually caught and verified the exception type.

This method is nicer.

@epixa epixa Added test type for asserting a thrown exception
Sometimes it is useful to test functionality that throws known exceptions given
specific conditions. The only existing solution was to pass to ok() an anonymous
function that manually caught and verified the exception type.

This method is nicer.
d82860a
@funkatron funkatron merged commit 2d39b5b into funkatron:master Oct 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.