Permalink
Browse files

Added example for using `FilesRunner`

Do we need a properly initialized run configuration?
  • Loading branch information...
1 parent e7b3126 commit a60f2b816a2d21b1b1a0e16293d4de0dae96b549 @rlegendi committed Jul 6, 2012
View
@@ -13,7 +13,9 @@ libraryDependencies ++= Seq(
// 1.11 is required because of Arguments visibility has been extended
// 1.12 is required because it contains a fix of "embedded" specifications
"org.specs2" %% "specs2" % "1.12-SNAPSHOT",
- "junit" % "junit" % "4.10" % "test"
+ "junit" % "junit" % "4.10" % "test",
+ // HTML reporting requirement
+ "org.pegdown" % "pegdown" % "1.0.2"
)
resolvers += "Local Maven Repository" at Path.userHome.asURL + "/.m2/repository"
@@ -28,7 +28,7 @@ class ScalaTestBridgeTest extends Specification {
"not indent decorated text at level 1" in {
ScalaTestBridge.getIndentedText("a", 1, true) must have be_== (IndentedText("- a", "a", 1))
}
-
+
"indent decorated text at level 2" in {
ScalaTestBridge.getIndentedText("a", 2, true) must have be_== (IndentedText(" - a", "a", 2))
}
@@ -0,0 +1,18 @@
+package org.scalatest.specs2
+
+import org.specs2.runner.SpecificationsFinder._
+import org.scalatest.WrapWith
+import org.specs2.Specification
+import org.junit.runner.RunWith
+import org.specs2.runner.JUnitRunner
+
+@RunWith(classOf[JUnitRunner])
+@WrapWith(classOf[Spec2Runner])
+class Index extends Specification {
+ def is =
+
+ examplesLinks("Example specifications")
+
+ // See the SpecificationsFinder trait for the parameters of the 'specifications' method
+ def examplesLinks(t: String) = specifications().foldLeft(t.title) { (res, cur) => res ^ see(cur) }
+}

0 comments on commit a60f2b8

Please sign in to comment.