struct Spectator::Example::Procsy
  
  - Spectator::Example::Procsy
 - Struct
 - Value
 - Object
 
Overview
Wraps an example to behave like a Proc.
This is typically used for an around_each hook.
Invoking #call or #run will run the example.
Defined in:
spectator/example.crConstructors
- 
        .new(example : Example, &proc :  -> )
        
          
Creates the example proxy.
 
Instance Method Summary
- 
        #call : Nil
        
          
Invokes the proc.
 - 
        #example : Example
        
          
Underlying example that will run.
 - 
        #run : Nil
        
          
Invokes the proc.
 - 
        #to_s(io : IO) : Nil
        
          
Constructs the full name or description of the example.
 - 
        #wrap(&block :  -> ) : self
        
          
Creates a new procsy for a block and the example from this instance.
 
Macro Summary
- 
        method_missing(call)
        
          
Allow instance to behave like an example.
 
Instance methods inherited from class Object
  
  
    
      should(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall Ushould(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
Creates the example proxy.
The example should be run eventually.
The proc defines the block of code to run when #call or #run is invoked.
Instance Method Detail
        
        def to_s(io : IO) : Nil
        #
      
      
        Constructs the full name or description of the example. This prepends names of groups this example is part of.
        
        def wrap(&block :  -> ) : self
        #
      
      
        Creates a new procsy for a block and the example from this instance.