Class: JmlTestRunner::TestCase
- Inherits:
-
Object
- Object
- JmlTestRunner::TestCase
- Defined in:
- lib/jml_test_runner/test_case.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#fn ⇒ Object
readonly
Returns the value of attribute fn.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#iteration ⇒ Object
readonly
Returns the value of attribute iteration.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #error? ⇒ Boolean
- #failure? ⇒ Boolean
-
#initialize(hash = {}) ⇒ TestCase
constructor
A new instance of TestCase.
- #success? ⇒ Boolean
Constructor Details
#initialize(hash = {}) ⇒ TestCase
Returns a new instance of TestCase.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/jml_test_runner/test_case.rb', line 7 def initialize(hash = {}) @result = hash['result'].to_sym @path = hash['path'] @fn = hash['fn'] @id = hash['id'] @iteration = hash['iteration'] @duration = hash['duration'] @description = hash['description'] = hash['message'] end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
5 6 7 |
# File 'lib/jml_test_runner/test_case.rb', line 5 def description @description end |
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
5 6 7 |
# File 'lib/jml_test_runner/test_case.rb', line 5 def duration @duration end |
#fn ⇒ Object (readonly)
Returns the value of attribute fn.
5 6 7 |
# File 'lib/jml_test_runner/test_case.rb', line 5 def fn @fn end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/jml_test_runner/test_case.rb', line 5 def id @id end |
#iteration ⇒ Object (readonly)
Returns the value of attribute iteration.
5 6 7 |
# File 'lib/jml_test_runner/test_case.rb', line 5 def iteration @iteration end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/jml_test_runner/test_case.rb', line 5 def end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/jml_test_runner/test_case.rb', line 5 def path @path end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
5 6 7 |
# File 'lib/jml_test_runner/test_case.rb', line 5 def result @result end |
Instance Method Details
#error? ⇒ Boolean
26 27 28 |
# File 'lib/jml_test_runner/test_case.rb', line 26 def error? @result == :error end |
#failure? ⇒ Boolean
22 23 24 |
# File 'lib/jml_test_runner/test_case.rb', line 22 def failure? @result == :failure end |
#success? ⇒ Boolean
18 19 20 |
# File 'lib/jml_test_runner/test_case.rb', line 18 def success? @result == :success end |