Groups

org.specs2.specification.Groups
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 } }

Attributes

Graph
Supertypes
trait GroupsLike
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

class NamedGroup(s: String)

Attributes

Supertypes
class Object
trait Matchable
class Any
trait g1 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g10 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g11 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g12 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g13 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g14 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g15 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g16 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g17 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g18 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g19 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g2 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g20 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g21 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g22 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g3 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g4 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g5 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g6 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g7 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g8 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait g9 extends ExamplesGroup

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Inherited classlikes

Attributes

Inherited from:
GroupsLike
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
trait group
trait group extends AutoNumberedGroup

Attributes

Inherited from:
GroupsLike
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

Concrete fields

var g1: () => ExamplesGroup
var g10: () => ExamplesGroup
var g11: () => ExamplesGroup
var g12: () => ExamplesGroup
var g13: () => ExamplesGroup
var g14: () => ExamplesGroup
var g15: () => ExamplesGroup
var g16: () => ExamplesGroup
var g17: () => ExamplesGroup
var g18: () => ExamplesGroup
var g19: () => ExamplesGroup
var g2: () => ExamplesGroup
var g20: () => ExamplesGroup
var g21: () => ExamplesGroup
var g22: () => ExamplesGroup
var g3: () => ExamplesGroup
var g4: () => ExamplesGroup
var g5: () => ExamplesGroup
var g6: () => ExamplesGroup
var g7: () => ExamplesGroup
var g8: () => ExamplesGroup
var g9: () => ExamplesGroup

Implicits

Implicits

implicit def namedGroup(s: String): NamedGroup

Inherited implicits

Attributes

Inherited from:
GroupsLike