class Spectator::PendingResult
Overview
Outcome that indicates running an example was pending. A pending result means the example is not ready to run yet. This can happen when the functionality to be tested is not implemented yet.
Defined in:
spectator/pending_result.crConstant Summary
- 
        DEFAULT_REASON = "No reason given"
Constructors
- 
        .new(reason : String = DEFAULT_REASON, location : Spectator::Location | Nil = nil, elapsed = Time::Span::ZERO, expectations = [] of Expectation)
        
          Creates the result. 
Instance Method Summary
- 
        #accept(visitor)
        
          Calls the pendingmethod on the visitor.
- 
        #accept(visitor, &)
        
          Calls the pendingmethod on the visitor.
- 
        #fail? : Bool
        
          Indicates whether the example failed. 
- 
        #location : Location
        
          Location the pending result was triggered from. 
- 
        #location? : Location | Nil
        
          Location the pending result was triggered from. 
- 
        #pass? : Bool
        
          Indicates whether the example passed. 
- 
        #reason : String
        
          Reason the example was skipped or marked pending. 
- 
        #to_json(json : JSON::Builder)
        
          Creates a JSON object from the result information. 
- 
        #to_s(io)
        
          One-word description of the result. 
Instance methods inherited from class Spectator::Result
  
  
    
      accept(visitor)
    accept, 
    
  
    
      elapsed : Time::Span
    elapsed, 
    
  
    
      expectations : Enumerable(Expectation)
    expectations, 
    
  
    
      fail? : Bool
    fail?, 
    
  
    
      pass? : Bool
    pass?, 
    
  
    
      pending? : Bool
    pending?, 
    
  
    
      to_json(json : JSON::Builder)
    to_json
    
  
    
  Constructor methods inherited from class Spectator::Result
  
  
    
      new(elapsed : Time::Span, expectations : Enumerable(Spectator::Expectation) = [] of Expectation)
    new
    
  
    
  
    
    
    
  
    
  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 result. elapsed is the length of time it took to run the example. A reason for the skip/pending result can be specified. If the pending result was triggered inside of an example, then location can be set.