Skip to content

Instantly share code, notes, and snippets.

@matterche
Created July 16, 2015 13:27
Show Gist options
  • Save matterche/b72f043e5376414e7e27 to your computer and use it in GitHub Desktop.
Save matterche/b72f043e5376414e7e27 to your computer and use it in GitHub Desktop.
IntelliJ Idea Template for ScalaTest table based property test
import org.scalatest.prop.PropertyChecks._
import org.scalatest.prop.Tables.Table
import org.scalatest.WordSpec
class MyTableBasedPropertySpec extends WordSpec {
val $testData$ = Table(
("$p1$", "$p2$", "$p3$"),
("1", 2, 3.0),
("4",5,6.0)
)
"A thing" when {
"something happens" should {
forAll($testData$) { ($p1$, $p2$, $p3$) =>
s"work as expected with $$$p1$, $$$p2$, $$$p3$ " in {
$END$pending
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment