class

Spectator::Expectations::ExampleExpectations

Inherits Enumerable < Reference < Object

Collection of expectations from an example.

Constructors

new(expectations : Array(Expectation))

Creates the collection.

Source

Instance methods

each

Iterates through all expectations.

Source
each_satisfied

Iterates over only the satisfied expectations.

Source
each_unsatisfied

Iterates over only the unsatisfied expectations.

Source
failed?

Determines whether the example failed based on if any expectations were not satisfied.

Source
satisfied

Returns a collection of only the satisfied expectations.

Source
successful?

Determines whether the example was successful based on if all expectations were satisfied.

Source
to_json(json : JSON::Builder)

Creates the JSON representation of the expectations.

Source
unsatisfied

Returns a collection of only the unsatisfied expectations.

Source