JUnit tests with "Enclosed" runner are run twice

Issue: GRADLE-2843

In this pull request a test case demonstrates the problem. I’ve also implemented a fix for it.

(Original thread: Enclosed JUnit tests are reported twice)

We appreciate the work put into this pull request.

The Gradle team doesn’t currently have the capacity to deal with all of the bugs, feature requests, great ideas and pull requests that we receive. Pull requests are interesting because they may seem like they come for “free”. Our experience has shown that in order to maintain the level of quality and consistency that Gradle users expect, we need to invest significant engineering effort in all but the most trivial PRs.

We are actively recruiting to increase our engineering team, so hopefully this is a temporary situation. We ask for patience in the meantime.