Class: SixthSense::Model::TestFile
- Inherits:
-
Struct
- Object
- Struct
- SixthSense::Model::TestFile
- Defined in:
- lib/sixth_sense/model.rb
Instance Attribute Summary collapse
-
#framework ⇒ Object
Returns the value of attribute framework.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#path ⇒ Object
Returns the value of attribute path.
-
#sut_candidates ⇒ Object
Returns the value of attribute sut_candidates.
-
#test_cases ⇒ Object
Returns the value of attribute test_cases.
Instance Method Summary collapse
Instance Attribute Details
#framework ⇒ Object
Returns the value of attribute framework
9 10 11 |
# File 'lib/sixth_sense/model.rb', line 9 def framework @framework end |
#metadata ⇒ Object
Returns the value of attribute metadata
9 10 11 |
# File 'lib/sixth_sense/model.rb', line 9 def @metadata end |
#path ⇒ Object
Returns the value of attribute path
9 10 11 |
# File 'lib/sixth_sense/model.rb', line 9 def path @path end |
#sut_candidates ⇒ Object
Returns the value of attribute sut_candidates
9 10 11 |
# File 'lib/sixth_sense/model.rb', line 9 def sut_candidates @sut_candidates end |
#test_cases ⇒ Object
Returns the value of attribute test_cases
9 10 11 |
# File 'lib/sixth_sense/model.rb', line 9 def test_cases @test_cases end |
Instance Method Details
#assertions ⇒ Object
17 18 19 |
# File 'lib/sixth_sense/model.rb', line 17 def assertions test_cases.flat_map(&:assertions) end |
#executable_loc ⇒ Object
21 22 23 |
# File 'lib/sixth_sense/model.rb', line 21 def executable_loc test_cases.sum(&:executable_loc) end |
#to_h ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/sixth_sense/model.rb', line 25 def to_h { path: path, framework: framework, test_cases: test_cases.map(&:to_h), sut_candidates: sut_candidates.map(&:to_h), metadata: || {} } end |