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, message = nil)
    should, 
    
  
    
      should_eventually(matcher, message = nil)
    should_eventually, 
    
  
    
      should_never(matcher, message = nil)
    should_never, 
    
  
    
      should_not(matcher, message = nil)
    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.