Module: Inferno::DSL::Results
- Included in:
- Entities::TestGroup, Entities::TestSuite
- Defined in:
- lib/inferno/dsl/results.rb
Overview
This module contains methods to set test results.
Instance Method Summary collapse
- 
  
    
      #omit(message = '')  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    Halt execution of the current test and mark it as omitted. 
- 
  
    
      #omit_if(test, message = '')  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    Halt execution of the current test and mark it as omitted if a condition is true. 
- 
  
    
      #pass(message = '')  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    Halt execution of the current test and mark it as passed. 
- 
  
    
      #pass_if(test, message = '')  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    Halt execution of the current test and mark it as passed if a condition is true. 
- 
  
    
      #skip(message = '')  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    Halt execution of the current test and mark it as skipped. 
- 
  
    
      #skip_if(test, message = '')  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    Halt execution of the current test and mark it as skipped if a condition is true. 
- 
  
    
      #wait(identifier:, message: '', timeout: 300)  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    Halt execution of the current test and wait for execution to resume. 
Instance Method Details
#omit(message = '') ⇒ void
This method returns an undefined value.
Halt execution of the current test and mark it as omitted. This method can also take a block with an assertion, and if the assertion fails, the test will omit rather than fail. The message parameter is ignored if a block is provided.
| 73 74 75 76 77 78 79 | # File 'lib/inferno/dsl/results.rb', line 73 def omit( = '') raise Exceptions::OmitException, unless block_given? yield rescue Exceptions::AssertionException => e raise Exceptions::OmitException, e. end | 
#omit_if(test, message = '') ⇒ void
This method returns an undefined value.
Halt execution of the current test and mark it as omitted if a condition is true.
| 87 88 89 | # File 'lib/inferno/dsl/results.rb', line 87 def omit_if(test, = '') raise Exceptions::OmitException, if test end | 
#pass(message = '') ⇒ void
This method returns an undefined value.
Halt execution of the current test and mark it as passed.
| 9 10 11 | # File 'lib/inferno/dsl/results.rb', line 9 def pass( = '') raise Exceptions::PassException, end | 
#pass_if(test, message = '') ⇒ void
This method returns an undefined value.
Halt execution of the current test and mark it as passed if a condition is true.
| 19 20 21 | # File 'lib/inferno/dsl/results.rb', line 19 def pass_if(test, = '') raise Exceptions::PassException, if test end | 
#skip(message = '') ⇒ void
This method returns an undefined value.
Halt execution of the current test and mark it as skipped. This method can also take a block with an assertion, and if the assertion fails, the test will skip rather than fail. The message parameter is ignored if a block is provided.
| 39 40 41 42 43 44 45 | # File 'lib/inferno/dsl/results.rb', line 39 def skip( = '') raise Exceptions::SkipException, unless block_given? yield rescue Exceptions::AssertionException => e raise Exceptions::SkipException, e. end | 
#skip_if(test, message = '') ⇒ void
This method returns an undefined value.
Halt execution of the current test and mark it as skipped if a condition is true.
| 53 54 55 | # File 'lib/inferno/dsl/results.rb', line 53 def skip_if(test, = '') raise Exceptions::SkipException, if test end | 
#wait(identifier:, message: '', timeout: 300) ⇒ void
This method returns an undefined value.
Halt execution of the current test and wait for execution to resume.
| 117 118 119 120 121 122 | # File 'lib/inferno/dsl/results.rb', line 117 def wait(identifier:, message: '', timeout: 300) identifier(identifier) wait_timeout(timeout) raise Exceptions::WaitException, end |