Using JUnit @Rule in Eclipse's JUnit runner
Eclipse 3.7.2

I just implemented an `@Rule` in some JUnit 4 tests, but when I run them in Eclipse the `MethodRule` methods are not being called. It's like the Eclipse test runner doesn't recognize the `@Rule` implementations and doesn't do anything special with fields that are annotated with `@Rule`.

I even tried using a "Standard" MethodRule like `org.junit.rules.TestName` but it doesn't work properly (the test's names are not populated into the instance). Even the example test in the JavaDoc of `TestName` fails when run in Eclipse.

Is there some trick? Does Eclipse simply not support JUnit [Rules][1]?



  [1]: http://junit.org/node/580
Using JUnit @Rule in Eclipse's JUnit runner
===

Eclipse 3.7.2

I just implemented an `@Rule` in some JUnit 4 tests, but when I run them in Eclipse the `MethodRule` methods are not being called. It's like the Eclipse test runner doesn't recognize the `@Rule` implementations and doesn't do anything special with fields that are annotated with `@Rule`.

I even tried using a "Standard" MethodRule like `org.junit.rules.TestName` but it doesn't work properly (the test's names are not populated into the instance). Even the example test in the JavaDoc of `TestName` fails when run in Eclipse.

Is there some trick? Does Eclipse simply not support JUnit [Rules][1]?



  [1]: http://junit.org/node/580