Class: TestRunner::TestScript
- Inherits:
 - 
      Object
      
        
- Object
 - TestRunner::TestScript
 
 
- Defined in:
 - lib/test-runner/test_script.rb
 
Instance Attribute Summary collapse
- #description ⇒ String readonly
 - #expect_failure ⇒ Boolean? readonly
 - #labels ⇒ Hash<String, String> readonly
 - #name ⇒ String readonly
 - #path ⇒ String readonly
 - #tags ⇒ Array<String> readonly
 - #test ⇒ Test readonly
 
Instance Method Summary collapse
- 
  
    
      #initialize(test, name, description:, expect_failure:, tags:, labels:)  ⇒ TestScript 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of TestScript.
 - #path_matches?(pattern) ⇒ Boolean
 - #set_singleton ⇒ Object
 - #singleton? ⇒ Boolean
 
Constructor Details
#initialize(test, name, description:, expect_failure:, tags:, labels:) ⇒ TestScript
Returns a new instance of TestScript.
      24 25 26 27 28 29 30 31 32 33  | 
    
      # File 'lib/test-runner/test_script.rb', line 24 def initialize(test, name, description:, expect_failure:, tags:, labels:) @test = test @name = name @path = "#{test.path}##{name}" @description = description || test.description @expect_failure = expect_failure.nil? ? test.expect_failure : expect_failure @tags = test. + @labels = test.labels.merge(labels) @singleton = false end  | 
  
Instance Attribute Details
#description ⇒ String (readonly)
      13 14 15  | 
    
      # File 'lib/test-runner/test_script.rb', line 13 def description @description end  | 
  
#expect_failure ⇒ Boolean? (readonly)
      16 17 18  | 
    
      # File 'lib/test-runner/test_script.rb', line 16 def expect_failure @expect_failure end  | 
  
#labels ⇒ Hash<String, String> (readonly)
      22 23 24  | 
    
      # File 'lib/test-runner/test_script.rb', line 22 def labels @labels end  | 
  
#name ⇒ String (readonly)
      7 8 9  | 
    
      # File 'lib/test-runner/test_script.rb', line 7 def name @name end  | 
  
#path ⇒ String (readonly)
      10 11 12  | 
    
      # File 'lib/test-runner/test_script.rb', line 10 def path @path end  | 
  
#tags ⇒ Array<String> (readonly)
      19 20 21  | 
    
      # File 'lib/test-runner/test_script.rb', line 19 def @tags end  | 
  
Instance Method Details
#path_matches?(pattern) ⇒ Boolean
      36 37 38  | 
    
      # File 'lib/test-runner/test_script.rb', line 36 def path_matches?(pattern) File.fnmatch?(pattern, path, File::FNM_EXTGLOB) end  | 
  
#set_singleton ⇒ Object
      40 41 42 43  | 
    
      # File 'lib/test-runner/test_script.rb', line 40 def set_singleton @path = test.path @singleton = true end  | 
  
#singleton? ⇒ Boolean
      45 46 47  | 
    
      # File 'lib/test-runner/test_script.rb', line 45 def singleton? @singleton end  |