abstract class Spectator::DSL::ExampleGroupBuilder

Overview

Base class for building all example groups.

Direct Known Subclasses

Defined in:

spectator/dsl/example_group_builder.cr

Instance Method Summary

Instance methods inherited from class Object

should(matcher : Spectator::Matchers::Matcher) should, should_not(matcher : Spectator::Matchers::Matcher) should_not

Instance Method Detail

def add_after_all_hook(block : -> ) : Nil #

Adds a hook to run after all examples (and nested examples) in this group.


[View source]
def add_after_each_hook(block : -> ) : Nil #

Adds a hook to run after each example (and nested example) in this group.


[View source]
def add_around_each_hook(block : Proc(Nil) -> ) : Nil #

Adds a hook to run around each example (and nested example) in this group. The block of code will be given another proc as an argument. It is expected that the block will call the proc.


[View source]
def add_before_all_hook(block : -> ) : Nil #

Adds a hook to run before all examples (and nested examples) in this group.


[View source]
def add_before_each_hook(block : -> ) : Nil #

Adds a hook to run before each example (and nested example) in this group.


[View source]
def add_child(child : Child) #

Adds a new example factory or group builder to this group.


[View source]
def add_post_condition(block : -> ) : Nil #

Adds a post-condition to run at the end of every example in this group.


[View source]
def add_pre_condition(block : -> ) : Nil #

Adds a pre-condition to run at the start of every example in this group.


[View source]