Skip to content

Instantly share code, notes, and snippets.

@moznion
Created November 22, 2012 07:47
Show Gist options
  • Save moznion/4129859 to your computer and use it in GitHub Desktop.
Save moznion/4129859 to your computer and use it in GitHub Desktop.
Hook AssertionError by groovy
private shouldAssertionError(Closure c) {
try {
c.call();
fail ("Error");
} catch (AssertionError expected) {
assert true; // Successful
}
}
@moznion
Copy link
Author

moznion commented Nov 22, 2012

こんなコードいらん!!!!
shouldFail でおk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment