class Spectator::ExampleGroupIteration(T)

Overview

Collection of examples and sub-groups for a single iteration of an iterative example group.

Defined in:

spectator/example_group_iteration.cr

Constructors

Instance Method Summary

Instance methods inherited from class Spectator::ExampleGroup

<<(node : Node) <<, after_all(hook : ExampleGroupHook) : Nil
after_all(*args, **kwargs) : Nil
after_all(*args, **kwargs, &block) : Nil
after_all
, after_each(hook : ExampleHook) : Nil
after_each(*args, **kwargs) : Nil
after_each(*args, **kwargs, &block) : Nil
after_each
, around_each(hook : ExampleProcsyHook) : Nil
around_each(*args, **kwargs) : Nil
around_each(*args, **kwargs, &block) : Nil
around_each
, ascend(&) ascend, before_all(hook : ExampleGroupHook) : Nil
before_all(*args, **kwargs) : Nil
before_all(*args, **kwargs, &block) : Nil
before_all
, before_each(hook : ExampleHook) : Nil
before_each(*args, **kwargs) : Nil
before_each(*args, **kwargs, &block) : Nil
before_each
, delete(node : Node) delete, finished? : Bool finished?, group : ExampleGroup group, group? : ExampleGroup | Nil group?, post_condition(hook : ExampleHook) : Nil
post_condition(*args, **kwargs) : Nil
post_condition(*args, **kwargs, &block) : Nil
post_condition
, pre_condition(hook : ExampleHook) : Nil
pre_condition(*args, **kwargs) : Nil
pre_condition(*args, **kwargs, &block) : Nil
pre_condition
, size(*args, **options)
size(*args, **options, &)
size
, to_s(io : IO, *, nested = false) : Nil to_s, unsafe_fetch(*args, **options)
unsafe_fetch(*args, **options, &)
unsafe_fetch

Constructor methods inherited from class Spectator::ExampleGroup

new(name : Label = nil, location : Location | Nil = nil, group : ExampleGroup | Nil = nil, metadata : Metadata | Nil = nil) new

Macros inherited from module Spectator::Hooks

define_hook(declaration, order = :append, &block) define_hook

Instance methods inherited from class Spectator::Node

display_name display_name, finished? : Bool finished?, inspect(io : IO) : Nil inspect, location : Location location, location? : Location | Nil location?, metadata : Metadata metadata, name : Label name, name? : Label | Nil name?, pending? pending?, pending_reason pending_reason, tags tags, to_s(io : IO) : Nil to_s

Constructor methods inherited from class Spectator::Node

new(name : Label = nil, location : Location | Nil = nil, metadata : Metadata | Nil = nil) new

Instance methods inherited from class Object

should(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should(matcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should
, should_eventually(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_eventually, should_never(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_never, should_not(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should_not(matcher : Spectator::Matchers::NilMatcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not(matcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not

Constructor Detail

def self.new(item : T, name : Label = nil, location : Location | Nil = nil, group : ExampleGroup | Nil = nil, metadata : Metadata | Nil = nil) #

Creates the example group iteration. The element for the current iteration is provided by item. The name describes the purpose of the group. It can be a Symbol to describe a type. This is typically a stringified form of item. The location tracks where the group exists in source code. This group will be assigned to the parent group if it is provided. A set of metadata can be used for filtering and modifying example behavior.


[View source]

Instance Method Detail

def item : T #

Item for this iteration of the example groups.


[View source]