Skip to content

Instantly share code, notes, and snippets.

@spiffxp
Created January 22, 2013 08:36
Show Gist options
  • Save spiffxp/4593075 to your computer and use it in GitHub Desktop.
Save spiffxp/4593075 to your computer and use it in GitHub Desktop.
Having an issue getting IntelliJ to highlight ScalaMock 3.x + ScalaTest properly
package com.example
import org.scalatest.FunSuite
import org.scalamock.scalatest.proxy.MockFactory
import org.scalamock.scalatest.{MockFactory => RegularMockFactory}
import org.scalamock.proxy.ProxyMockFactory
trait Highlight
class ProxyMockIntelliJHighlightingBrokenTest extends FunSuite with MockFactory {
test("unable to resolve mock symbol") {
val foo = mock[Highlight]
}
test("super[ProxyMockFactory] won't compile here") {
// val foo = super[ProxyMockFactory].mock[Highlight]
}
}
class ProxyMockIntelliJHighlightingWorkaroundTest extends FunSuite with RegularMockFactory with ProxyMockFactory {
test("super[ProxyMockFactory] resolves symbol") {
val foo = super[ProxyMockFactory].mock[Highlight]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment