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 {

    public void setUp() throws Exception {
        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! :)


1 comment
Comment actions Permalink

This is the correct approach. I've updated the documentation to include this information. Thanks for the notice!


Please sign in to leave a comment.