Testing documentation - enableInspections
Hi all,
I was just noticing there's no information on how to test custom inspections on the testing documentation page
I've found that if I manually add the custom inspection to the test fixture during setUp it allows the inspection to succesfully trigger
public class DuplicatedBeanIdInspectionTest extends LightCodeInsightFixtureTestCase { @Override public void setUp() throws Exception { super.setUp(); myFixture.enableInspections(new DuplicatedBeanIdInspection()); }
Possibly we could add this to the documentation to save a few hours for someone in the future;
Or if there's a cooler way to do this, that would be great to add too! :)
Cheers
Please sign in to leave a comment.
This is the correct approach. I've updated the documentation to include this information. Thanks for the notice!