abstract class Spectator::Result
- Spectator::Result
- Reference
- Object
Overview
Base class that represents the outcome of running an example. Sub-classes contain additional information specific to the type of result.
Direct Known Subclasses
Defined in:
spectator/result.crConstructors
- 
        .new(elapsed : Time::Span, expectations : Enumerable(Spectator::Expectation) = [] of Expectation)
        
          Creates the result. 
Instance Method Summary
- 
        #accept(visitor)
        
          Calls the corresponding method for the type of result. 
- 
        #elapsed : Time::Span
        
          Length of time it took to run the example. 
- 
        #expectations : Enumerable(Expectation)
        
          The assertions checked in the example. 
- 
        #fail? : Bool
        
          Indicates whether the example failed. 
- 
        #pass? : Bool
        
          Indicates whether the example passed. 
- 
        #pending? : Bool
        
          Indicates whether the example was skipped. 
- 
        #to_json(json : JSON::Builder)
        
          Creates a JSON object from the result information. 
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
        
        def self.new(elapsed : Time::Span, expectations : Enumerable(Spectator::Expectation) = [] of Expectation)
        #
      
      
        Creates the result. elapsed is the length of time it took to run the example.
Instance Method Detail
        abstract 
        def accept(visitor)
        #
      
      
        Calls the corresponding method for the type of result. This is the visitor design pattern.