Skip to content

Instantly share code, notes, and snippets.

@moznion
Created November 22, 2012 07:47
Show Gist options
  • Select an option

  • Save moznion/4129859 to your computer and use it in GitHub Desktop.

Select an option

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

moznion commented Nov 22, 2012

Copy link
Copy Markdown
Author

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

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