Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Method rules should not be invoked before @Before-annotated methods

#60

When running tests through Eclipse's built-in runner or through Maven, I see that @Before-annotated methods get executed before any applicable @Rules. That's exactly what I want, because the rule uses instance variables in the test that are set by the @Before method.

But in Infinitest, it's clear that the method rule gets executed before the @Before-annotated method. Because the instance variable hasn't been setup yet, the rule sees a null and fails.

I would think that tests run through Infinitest should be consistent with how they're run through other JUnit runners.

Reported by habuma · September 22nd, 2010 @ 04:40 AM

State: new
Milestone: none
Assigned to: benrady (at gmail) benrady (at gmail)

Activity

  1. benrady (at gmail)
    benrady (at gmail)

    Fixing this may be as simple as upgrading the version of JUnit that
    Infinitest uses

    September 22nd, 2010 @ 12:30 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.