class

Spectator::NestedExampleGroup

Inherits Spectator::ExampleGroup < Iterable < Enumerable < Spectator::ExampleComponent < Reference < Object

A collection of examples and other example groups. This group can be nested under other groups.

Constructors

new(description : String | Symbol, source : Spectator::Source, parent : Spectator::ExampleGroup, context)

Creates a new example group. The description argument is a description from the user. The parent should contain this group. After creating this group, the parent's children should be updated. The parent's children must contain this group, otherwise there may be unexpected behavior. The hooks are stored to be triggered later.

Source

Instance methods

description

Description from the user of the group's contents. This is a symbol when referencing a type.

Source
parent

Group that this is nested in.

Source
source
Source
symbolic?

Indicates wheter the group references a type.

Source
to_s(io)

Creates a string representation of the group. The string consists of #description appended to the parent. This results in a string like:

Foo#bar does something

for the following structure:

describe Foo do
  describe "#bar" do
    it "does something" do
      # ...
    end
  end
end
Source