trait Snippets extends execute.Snippets
Snippets of code can be extracted from interpolated specification strings.
When you want to specify that a piece of code must be included in the specification output, you can use the snippet
method to execute a this code and use the text in the output. If you just want to output part of the code you need to
delimit it with some comments // 8<-------
(with as many dashes as you want)
Generally the last value of a snippet will be displayed separately but it is possible to avoid this by using the mute
method on a Snippet.
It is also possible to check that the result value is equal to a specific value by using the check[R : AsResult](f: T => R)
method.
- Self Type
- Snippets with S2StringContextCreation with FragmentsFactory
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Snippets
- Snippets
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def createSnippet[T](rangepos: Boolean, expression: String, code: => T, params: SnippetParams[T]): Snippet[T]
- Definition Classes
- Snippets
- implicit def defaultSnippetParameters[T]: SnippetParams[T]
- Definition Classes
- Snippets
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def fullName[T](implicit arg0: scala.reflect.api.JavaUniverse.WeakTypeTag[T]): String
- Definition Classes
- Snippets
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def simpleName[T](implicit arg0: scala.reflect.api.JavaUniverse.WeakTypeTag[T]): String
- Definition Classes
- Snippets
- macro def snippet[T](code: => T)(implicit params: SnippetParams[T]): Snippet[T]
- Definition Classes
- Snippets
- implicit def snippetIsSpecPart[T](snippet: Snippet[T]): InterpolatedFragment
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- macro def termName(m: Any): String
- Definition Classes
- Snippets
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()