Created
May 1, 2015 15:39
-
-
Save gmalouf/51a8722b50f6a9d30404 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package spray.testkit | |
import org.specs2.execute.{ Failure, FailureException } | |
import org.specs2.specification.core.{ Fragments, SpecificationStructure } | |
import org.specs2.specification.create.DefaultFragmentFactory | |
trait Specs2Interface extends TestFrameworkInterface with SpecificationStructure { | |
def failTest(msg: String) = { | |
val trace = new Exception().getStackTrace.toList | |
val fixedTrace = trace.drop(trace.indexWhere(_.getClassName.startsWith("org.specs2")) - 1) | |
throw new FailureException(Failure(msg, stackTrace = fixedTrace)) | |
} | |
override def map(fs: ⇒ Fragments) = super.map(fs).append(DefaultFragmentFactory.step(cleanUp())) | |
} | |
trait NoAutoHtmlLinkFragments extends org.specs2.specification.dsl.ReferenceDsl { | |
override def linkFragment(alias: String) = super.linkFragment(alias) | |
override def seeFragment(alias: String) = super.seeFragment(alias) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment