trait Groups extends GroupsLike

This trait can be used to standardize names for groups of examples in an acceptance specification.

class MySpecification extends Specification with Examples { def is = s2""" first example in first group ${g1().e1} second example in first group ${g1().e2}

first example in second group ${g2().e1} second example in second group ${g2().e2} """ }

trait Examples extends Groups with Matchers { "first group of examples" - new g1 { e1 := ok e2 := ok } "second group of examples" - new g2 { e1 := ok e2 := ok } }

It is important to notice that the examples must be called with g1().e1 so as to create a new g1 trait instance with new local variables for the example e1. If this is not required, the Grouped trait can be used instead

If you don't want to manage groups and examples numbers it is also possible to write the following (note the script.Specification):

class MySpecification extends script.Specification with Examples { def is = s2""" first example in first group second example in first group

first example in second group second example in second group """ }

trait Examples extends Groups with Matchers { "first group of examples" - new group { eg := ok eg := ok } "second group of examples" - new group { eg := ok eg := ok } }

Self Type
Groups with S2StringContextCreation
Linear Supertypes
GroupsLike, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Groups
  2. GroupsLike
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class NamedGroup extends AnyRef
  2. trait g1 extends ExamplesGroup
  3. trait g10 extends ExamplesGroup
  4. trait g11 extends ExamplesGroup
  5. trait g12 extends ExamplesGroup
  6. trait g13 extends ExamplesGroup
  7. trait g14 extends ExamplesGroup
  8. trait g15 extends ExamplesGroup
  9. trait g16 extends ExamplesGroup
  10. trait g17 extends ExamplesGroup
  11. trait g18 extends ExamplesGroup
  12. trait g19 extends ExamplesGroup
  13. trait g2 extends ExamplesGroup
  14. trait g20 extends ExamplesGroup
  15. trait g21 extends ExamplesGroup
  16. trait g22 extends ExamplesGroup
  17. trait g3 extends ExamplesGroup
  18. trait g4 extends ExamplesGroup
  19. trait g5 extends ExamplesGroup
  20. trait g6 extends ExamplesGroup
  21. trait g7 extends ExamplesGroup
  22. trait g8 extends ExamplesGroup
  23. trait g9 extends ExamplesGroup
  24. trait AutoNumberedGroup extends ExamplesGroup
    Definition Classes
    GroupsLike
  25. trait group extends ExamplesGroup with (GroupsLike.this)#AutoNumberedGroup
    Definition Classes
    GroupsLike

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. def createExamplesGroup(i: Int): ExamplesGroup
    Definition Classes
    GroupsGroupsLike
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. implicit def executionVarIsInterpolatedFragment(executionVar: ⇒ ExecutionVar): InterpolatedFragment
    Definition Classes
    GroupsLike
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. val g1: () ⇒ ExamplesGroup
  12. val g10: () ⇒ ExamplesGroup
  13. val g11: () ⇒ ExamplesGroup
  14. val g12: () ⇒ ExamplesGroup
  15. val g13: () ⇒ ExamplesGroup
  16. val g14: () ⇒ ExamplesGroup
  17. val g15: () ⇒ ExamplesGroup
  18. val g16: () ⇒ ExamplesGroup
  19. val g17: () ⇒ ExamplesGroup
  20. val g18: () ⇒ ExamplesGroup
  21. val g19: () ⇒ ExamplesGroup
  22. val g2: () ⇒ ExamplesGroup
  23. val g20: () ⇒ ExamplesGroup
  24. val g21: () ⇒ ExamplesGroup
  25. val g22: () ⇒ ExamplesGroup
  26. val g3: () ⇒ ExamplesGroup
  27. val g4: () ⇒ ExamplesGroup
  28. val g5: () ⇒ ExamplesGroup
  29. val g6: () ⇒ ExamplesGroup
  30. val g7: () ⇒ ExamplesGroup
  31. val g8: () ⇒ ExamplesGroup
  32. val g9: () ⇒ ExamplesGroup
  33. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  34. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  35. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  36. implicit def namedGroup(s: String): (Groups.this)#NamedGroup
  37. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  38. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  39. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  40. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  41. def toString(): String
    Definition Classes
    AnyRef → Any
  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from GroupsLike

Inherited from AnyRef

Inherited from Any

Ungrouped