Class: OCRunner::TestSuite
- Inherits:
-
Object
- Object
- OCRunner::TestSuite
- Defined in:
- lib/ocrunner/test_suite.rb
Instance Attribute Summary collapse
-
#cases ⇒ Object
Returns the value of attribute cases.
-
#name ⇒ Object
readonly
Container for test suite info.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
- #failed_cases ⇒ Object
- #failures? ⇒ Boolean
-
#initialize(name) ⇒ TestSuite
constructor
A new instance of TestSuite.
Constructor Details
#initialize(name) ⇒ TestSuite
Returns a new instance of TestSuite.
9 10 11 12 |
# File 'lib/ocrunner/test_suite.rb', line 9 def initialize(name) @name = name @cases = [] end |
Instance Attribute Details
#cases ⇒ Object
Returns the value of attribute cases.
7 8 9 |
# File 'lib/ocrunner/test_suite.rb', line 7 def cases @cases end |
#name ⇒ Object (readonly)
Container for test suite info
6 7 8 |
# File 'lib/ocrunner/test_suite.rb', line 6 def name @name end |
#time ⇒ Object
Returns the value of attribute time.
7 8 9 |
# File 'lib/ocrunner/test_suite.rb', line 7 def time @time end |
Instance Method Details
#failed_cases ⇒ Object
18 19 20 |
# File 'lib/ocrunner/test_suite.rb', line 18 def failed_cases @cases.reject {|kase| kase.passed?} end |
#failures? ⇒ Boolean
14 15 16 |
# File 'lib/ocrunner/test_suite.rb', line 14 def failures? @cases.any? {|kase| !kase.passed?} end |