abstract class SpectatorContext
- SpectatorContext
- Reference
- Object
Overview
Base class that all test cases run in.
This type is used to store all test case contexts as a single type.
The instance must be downcast to the correct type before calling a context method.
This type is intentionally outside the Spectator
module.
The reason for this is to prevent name collision when using the DSL to define a spec.
Direct Known Subclasses
Defined in:
spectator/context.crInstance Method Summary
-
#inspect(io)
Produces a dummy string to represent the context as a string.
-
#to_s(io)
Produces a dummy string to represent the context as a string.
Instance methods inherited from class Object
should(matcher, message = nil)
should,
should_eventually(matcher, message = nil)
should_eventually,
should_never(matcher, message = nil)
should_never,
should_not(matcher, message = nil)
should_not
Instance Method Detail
Produces a dummy string to represent the context as a string.
This prevents the default behavior, which normally stringifies instance variables.
Due to the sheer amount of types Spectator can create
and that the Crystal compiler instantiates a #to_s
and/or #inspect
for each of those types,
an explosion in method instances can be created.
The compile time is drastically reduced by using a dummy string instead.
Produces a dummy string to represent the context as a string.
This prevents the default behavior, which normally stringifies instance variables.
Due to the sheer amount of types Spectator can create
and that the Crystal compiler instantiates a #to_s
and/or #inspect
for each of those types,
an explosion in method instances can be created.
The compile time is drastically reduced by using a dummy string instead.