vendredi 26 décembre 2014

shouldFail vs. thrown

In investigating Groovy and Spock testing, I have run across two ways of catching exceptions: shouldFail and thrown.


Is there a real difference between these two ways of asserting against exceptions? It looks like shouldFail is more JUnit-ish and thrown is more Spock, but other than this I can't find any descriptions of the difference or best practices between them.


Thank you.


Aucun commentaire:

Enregistrer un commentaire