Snippets

trait Snippets extends 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.

trait Snippets
class Object
trait Matchable
class Any

Type members

Inherited classlikes

implicit class SettableSnippet[T](s: Snippet[T])

implicit function modify the Snippet parameters

implicit function modify the Snippet parameters

Inherited from:
Snippets
implicit class SettableSnippet1[T](s: Snippet[T])(implicit evidence$1: AsResult[T])
Inherited from:
Snippets

Value members

Inherited methods

def snippet[T](code: => T)(implicit params: SnippetParams[T]): Snippet[T]
Inherited from:
Snippets

Implicits

Implicits

implicit def snippetIsSpecPart[T](snippet: Snippet[T]): InterpolatedFragment

Inherited implicits

final implicit def SettableSnippet[T](s: Snippet[T]): SettableSnippet[T]

implicit function modify the Snippet parameters

implicit function modify the Snippet parameters

Inherited from:
Snippets
final implicit def SettableSnippet1[T : AsResult](s: Snippet[T]): SettableSnippet1[T]
Inherited from:
Snippets
implicit def defaultSnippetParameters[T]: SnippetParams[T]

implicit parameters selected for the creation of Snippets

implicit parameters selected for the creation of Snippets

Inherited from:
Snippets