junit-team/junit — pull request #668 by gaffa (2013-04-25 15:52:52+00:00)
Title: system-property configured global rule activation

Hi folks!
We need to activate a rule globally based on surefire-argline. Its no option to annotate all classes with @Rule as there are just to many and also we only want the rule to be used in certain jenkins jobs. This is a first approch. Please note that:

- I did not know what to do with the exceptions in this case
- I did not know where to put the property-identifying string
- I did forget some of the formatting rules in junit

I would love to get your help to make this pull request mergeable. I searched around the net and found quite some people searching for a solution like this.

Of course there are drawbacks. As if the users want to use a Rule like Timeout (which needs constructor-args) they need to extend that rule, grab the parameters somewhere and call super() with those params. But I think most people can live with that.