Class: Drntest::TestResults
- Inherits:
-
Object
- Object
- Drntest::TestResults
- Defined in:
- lib/drntest/test-results.rb
Instance Attribute Summary collapse
-
#actuals ⇒ Object
Returns the value of attribute actuals.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#expecteds ⇒ Object
Returns the value of attribute expecteds.
-
#name ⇒ Object
Returns the value of attribute name.
-
#omit_message ⇒ Object
readonly
Returns the value of attribute omit_message.
Instance Method Summary collapse
-
#initialize(name) ⇒ TestResults
constructor
A new instance of TestResults.
- #omit(message) ⇒ Object
- #status ⇒ Object
Constructor Details
#initialize(name) ⇒ TestResults
Returns a new instance of TestResults.
21 22 23 24 25 26 27 28 |
# File 'lib/drntest/test-results.rb', line 21 def initialize(name) @name = name @actuals = [] @expecteds = [] @errors = [] @omitted = false @omit_message = nil end |
Instance Attribute Details
#actuals ⇒ Object
Returns the value of attribute actuals.
18 19 20 |
# File 'lib/drntest/test-results.rb', line 18 def actuals @actuals end |
#errors ⇒ Object
Returns the value of attribute errors.
18 19 20 |
# File 'lib/drntest/test-results.rb', line 18 def errors @errors end |
#expecteds ⇒ Object
Returns the value of attribute expecteds.
18 19 20 |
# File 'lib/drntest/test-results.rb', line 18 def expecteds @expecteds end |
#name ⇒ Object
Returns the value of attribute name.
18 19 20 |
# File 'lib/drntest/test-results.rb', line 18 def name @name end |
#omit_message ⇒ Object (readonly)
Returns the value of attribute omit_message.
19 20 21 |
# File 'lib/drntest/test-results.rb', line 19 def @omit_message end |
Instance Method Details
#omit(message) ⇒ Object
43 44 45 46 |
# File 'lib/drntest/test-results.rb', line 43 def omit() @omitted = true @omit_message = end |
#status ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/drntest/test-results.rb', line 30 def status return :omitted if @omitted return :error unless @errors.empty? return :no_response if @actuals.empty? return :not_checked if @expecteds.empty? if @actuals == @expecteds :success else :failure end end |