Fix ScalaSpecs2TestContextProviderTest for 2019.3.
The test context provider appends `#` to the filter flag depending on
whether the test class is JUni3 or JUnit4. 2019.3 changes how JUnit4
is identified by adding a check for org.junit.Test existing.
@@ -34,14 +34,12 @@ import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiFile;
import java.util.List;
import org.jetbrains.plugins.scala.lang.psi.api.ScalaFile;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/** Integration tests for {@link ScalaSpecs2TestContextProvider}. */
@RunWith(JUnit4.class)
-@Ignore("Failing in 2019.3")
public class ScalaSpecs2TestContextProviderTest extends BlazeRunConfigurationProducerTestCase {
@Test
@@ -87,6 +85,10 @@ public class ScalaSpecs2TestContextProviderTest extends BlazeRunConfigurationPro
}
private PsiFile createTestPsiFile() {
+ createAndIndexFile(
+ WorkspacePath.createIfValid("scala/org/junit/Test.scala"),
+ "package org.junit",
+ "class Test");
createAndIndexFile(
WorkspacePath.createIfValid("scala/org/junit/runner/RunWith.scala"),
"package org.junit.runner",
