diff --git a/allClassTestsInOneFile.scala b/allClassTestsInOneFile.scala index 6ecaf65..3bd2076 100644 --- a/allClassTestsInOneFile.scala +++ b/allClassTestsInOneFile.scala @@ -124,15 +124,15 @@ def generateSpecs2Immutable(testCount: Int, targetDir: File): File = { package iSpecification import org.specs2cls._ - -class ExampleSpec extends SpecificationClass { def is = - "Scala can" ^ -""") - + +class ExampleSpec extends SpecificationClass { def is =""" + "\n" + +" s2\"\"\"Scala can ^" +) + for (x <- 1 to testCount) - targetOut.write(" \"increment " + x + "\" ! e" + x + "^\n") - - targetOut.write(" end\n") + targetOut.write(" \"increment " + x + "\" $e" + x + "^\n") + + targetOut.write(" \"\"\"\n") for (x <- 1 to testCount) targetOut.write("def e" + x + " = " + x + " + 1 must beEqualTo (" + (x+1) + ")\n") @@ -309,7 +309,7 @@ if (scalaVersion != "unknown") { fileCountFile.write(headers) fileSizeFile.write(headers) - styles.foreach { style => + styles.foreach { style => testTypes.foreach { testType => durationFile.write(style.name) // + " " + testType.name) Don't write with MustMatchers to get all 4 names to fit on graph durationFile.flush() diff --git a/allTestsInOneFile.scala b/allTestsInOneFile.scala index 0a10870..1270328 100644 --- a/allTestsInOneFile.scala +++ b/allTestsInOneFile.scala @@ -124,15 +124,15 @@ def generateSpecs2Immutable(testCount: Int, targetDir: File): File = { package iSpecification import org.specs2._ - -class ExampleSpec extends Specification { def is = - "Scala can" ^ -""") - + +class ExampleSpec extends Specification { def is =""" + "\n" + +" s2\"\"\"Scala can ^" +) + for (x <- 1 to testCount) - targetOut.write(" \"increment " + x + "\" ! e" + x + "^\n") - - targetOut.write(" end\n") + targetOut.write(" \"increment " + x + "\" $e" + x + "^\n") + + targetOut.write(" \"\"\"\n") for (x <- 1 to testCount) targetOut.write("def e" + x + " = " + x + " + 1 must be equalTo (" + (x+1) + ")\n") @@ -282,7 +282,7 @@ if (scalaVersion != "unknown") { fileCountFile.write(headers) fileSizeFile.write(headers) - styles.foreach { style => + styles.foreach { style => testTypes.foreach { testType => durationFile.write(style.name) // + " " + testType.name) Don't write with MustMatchers to get all 4 names to fit on graph durationFile.flush() diff --git a/tenTestsPerFile.scala b/tenTestsPerFile.scala index 8ae4a9a..3c8eb54 100644 --- a/tenTestsPerFile.scala +++ b/tenTestsPerFile.scala @@ -168,14 +168,14 @@ package iSpecification import org.specs2._ -class ExampleSpec""" + fileNumber + """ extends Specification { def is = - "Scala can" ^ -""") +class ExampleSpec""" + fileNumber + " extends Specification { def is =\n" + +" s2\"\"\"Scala can ^" +) for (x <- 1 to testCount) - targetOut.write(" \"increment " + x + "\" ! e" + x + "^\n") + targetOut.write(" \"increment " + x + "\" $e" + x + "^\n") - targetOut.write(" end\n") + targetOut.write(" \"\"\"\n") for (x <- 1 to testCount) targetOut.write("def e" + x + " = " + x + " + 1 must be equalTo (" + (x+1) + ")\n") @@ -345,7 +345,7 @@ if (scalaVersion != "unknown") { fileCountFile.write(headers) fileSizeFile.write(headers) - styles.foreach { style => + styles.foreach { style => testTypes.foreach { testType => try { durationFile.write(style.name) // Don't write with MustMatchers to get all 4 names to fit on graph diff --git a/testsIn100Files.scala b/testsIn100Files.scala index 6ae3dbb..db1c473 100644 --- a/testsIn100Files.scala +++ b/testsIn100Files.scala @@ -146,15 +146,15 @@ def generateSpecs2Immutable(testCount: Int, targetDir: File, fileNumber: Int): F package iSpecification import org.specs2._ - -class ExampleSpec""" + fileNumber + """ extends Specification { def is = - "Scala can" ^ -""") - + +class ExampleSpec""" + fileNumber + " extends Specification { def is =\n" + +" s2\"\"\"Scala can ^" +) + for (x <- 1 to testCount) - targetOut.write(" \"increment " + x + "\" ! e" + x + "^\n") - - targetOut.write(" end\n") + targetOut.write(" \"increment " + x + "\" $e" + x + "^\n") + + targetOut.write(" \"\"\"\n") for (x <- 1 to testCount) targetOut.write("def e" + x + " = " + x + " + 1 must be equalTo (" + (x+1) + ")\n") @@ -305,7 +305,7 @@ if (scalaVersion != "unknown") { fileCountFile.write(headers) fileSizeFile.write(headers) - styles.foreach { style => + styles.foreach { style => testTypes.foreach { testType => try { durationFile.write(style.name) // Don't write with MustMatchers to get all 4 names to fit on graph