Class: TestSuite
- Inherits:
-
Object
- Object
- TestSuite
- Defined in:
- lib/second_curtain/test_suite.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#test_cases ⇒ Object
Returns the value of attribute test_cases.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name) ⇒ TestSuite
constructor
A new instance of TestSuite.
- #latest_test_case ⇒ Object
Constructor Details
#initialize(name) ⇒ TestSuite
Returns a new instance of TestSuite.
14 15 16 17 |
# File 'lib/second_curtain/test_suite.rb', line 14 def initialize (name) @name = name @test_cases = [] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/second_curtain/test_suite.rb', line 3 def name @name end |
#test_cases ⇒ Object
Returns the value of attribute test_cases.
2 3 4 |
# File 'lib/second_curtain/test_suite.rb', line 2 def test_cases @test_cases end |
Class Method Details
.suite_from_line(line) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/second_curtain/test_suite.rb', line 5 def self.suite_from_line(line) components = line.split("Test Suite '") end_components = line.split("' started at") if components.count == 2 && end_components.count == 2 TestSuite.new(components.last.split("'").first) end end |
Instance Method Details
#latest_test_case ⇒ Object
19 20 21 |
# File 'lib/second_curtain/test_suite.rb', line 19 def latest_test_case @test_cases.last end |