struct Athena::Console::Spec::ApplicationTester
   
  - Athena::Console::Spec::ApplicationTester
- Struct
- Value
- Object
Overview
Functionally similar to ACON::Spec::CommandTester, but used for testing entire ACON::Applications.
Can be useful if your project extends the base application in order to customize it in some way.
NOTE  Be sure to set ACON::Application#auto_exit= to false, when testing an entire application.
Included Modules
Defined in:
spec.crConstructors
Instance Method Summary
- 
        #application : ACON::Application
        
          Returns the ACON::Applicationinstance being tested.
- 
        #input : ACON::Input::Interface
        
          Returns the ACON::Input::Interfacebeing used by the tester.
- 
        #input? : ACON::Input::Interface | Nil
        
          Returns the ACON::Input::Interfacebeing used by the tester.
- 
        #run(input : Hash(String, _) = Hash(String, String).new, *, decorated : Bool | Nil = nil, interactive : Bool | Nil = nil, capture_stderr_separately : Bool = false, verbosity : ACON::Output::Verbosity | Nil = nil) : ACON::Command::Status
        
          Runs the application, with the provided input being used as the input of ACON::Application#run.
- 
        #run(decorated : Bool = false, interactive : Bool | Nil = nil, capture_stderr_separately : Bool = false, verbosity : ACON::Output::Verbosity | Nil = nil, **input : _)
        
          Runs the application, with the provided input being used as the input of ACON::Application#run.
- 
        #status : ACON::Command::Status | Nil
        
          Returns the ACON::Command::Statusof the command execution, ornilif it has not yet been executed.
Instance methods inherited from module Athena::Console::Spec::Tester
  
  
    
      assert_command_is_not_successful(message : String = "", *, file : String = __FILE__, line : Int32 = __LINE__) : Nil
    assert_command_is_not_successful, 
    
  
    
      assert_command_is_successful(message : String = "", *, file : String = __FILE__, line : Int32 = __LINE__) : Nil
    assert_command_is_successful, 
    
  
    
      display(normalize : Bool = false) : String
    display, 
    
  
    
      error_output(normalize : Bool = false) : String
    error_output, 
    
  
    
      inputs(*args : String) : Nil
    inputs, 
    
  
    
      inputs=(inputs : Array(String))
    inputs=, 
    
  
    
      output : ACON::Output::Interface
    output, 
    
  
    
      output? : ACON::Output::Interface | Nil
    output?, 
    
  
    
      status : ACON::Command::Status | Nil
    status
    
  
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
Constructor Detail
Instance Method Detail
Returns the ACON::Input::Interface being used by the tester.
Runs the application, with the provided input being used as the input of ACON::Application#run.
Custom values for decorated, interactive, and verbosity can also be provided and will be forwarded to their respective types.
capture_stderr_separately makes it so output to STDERR is captured separately, in case you wanted to test error output.
Otherwise both error and normal output are captured via ACON::Spec::Tester#display.
Runs the application, with the provided input being used as the input of ACON::Application#run.
Custom values for decorated, interactive, and verbosity can also be provided and will be forwarded to their respective types.
capture_stderr_separately makes it so output to STDERR is captured separately, in case you wanted to test error output.
Otherwise both error and normal output are captured via ACON::Spec::Tester#display.
Returns the ACON::Command::Status of the command execution, or nil if it has not yet been executed.