Skip to content

Instantly share code, notes, and snippets.

@ColinHarrington
Created November 23, 2011 07:27
Show Gist options
  • Save ColinHarrington/1388099 to your computer and use it in GitHub Desktop.
Save ColinHarrington/1388099 to your computer and use it in GitHub Desktop.
shouldFail Should Fail on unexpected Exception
void testShouldFailOnUnexpectedExceptionShouldFail() {
shouldFail {
shouldFail(MyException) {
throw new NullPointerException()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment