Class: OCRunner::TestCase
- Inherits:
-
Object
- Object
- OCRunner::TestCase
- Defined in:
- lib/ocrunner/test_case.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#name ⇒ Object
readonly
Container for test case info.
-
#passed ⇒ Object
Returns the value of attribute passed.
Instance Method Summary collapse
- #fail! ⇒ Object
-
#initialize(name) ⇒ TestCase
constructor
A new instance of TestCase.
- #passed? ⇒ Boolean
Constructor Details
#initialize(name) ⇒ TestCase
Returns a new instance of TestCase.
10 11 12 13 14 |
# File 'lib/ocrunner/test_case.rb', line 10 def initialize(name) @name = name @errors = [] @passed = true end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
8 9 10 |
# File 'lib/ocrunner/test_case.rb', line 8 def errors @errors end |
#name ⇒ Object (readonly)
Container for test case info
6 7 8 |
# File 'lib/ocrunner/test_case.rb', line 6 def name @name end |
#passed ⇒ Object
Returns the value of attribute passed.
7 8 9 |
# File 'lib/ocrunner/test_case.rb', line 7 def passed @passed end |
Instance Method Details
#fail! ⇒ Object
16 17 18 |
# File 'lib/ocrunner/test_case.rb', line 16 def fail! @passed = false end |
#passed? ⇒ Boolean
20 21 22 |
# File 'lib/ocrunner/test_case.rb', line 20 def passed? @passed end |