Class: GreenPepper::ExecutionResults
- Inherits:
-
Object
- Object
- GreenPepper::ExecutionResults
- Defined in:
- lib/greenpepper/example/executionresults.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#failures ⇒ Object
Returns the value of attribute failures.
-
#ignored ⇒ Object
Returns the value of attribute ignored.
-
#successes ⇒ Object
Returns the value of attribute successes.
Class Method Summary collapse
Instance Method Summary collapse
- #add_error ⇒ Object
- #add_failure ⇒ Object
- #add_ignore ⇒ Object
- #add_success ⇒ Object
-
#initialize ⇒ ExecutionResults
constructor
A new instance of ExecutionResults.
Constructor Details
#initialize ⇒ ExecutionResults
Returns a new instance of ExecutionResults.
12 13 14 15 16 17 |
# File 'lib/greenpepper/example/executionresults.rb', line 12 def initialize @successes = 0 @failures = 0 @errors = 0 @ignored = 0 end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
10 11 12 |
# File 'lib/greenpepper/example/executionresults.rb', line 10 def errors @errors end |
#failures ⇒ Object
Returns the value of attribute failures.
10 11 12 |
# File 'lib/greenpepper/example/executionresults.rb', line 10 def failures @failures end |
#ignored ⇒ Object
Returns the value of attribute ignored.
10 11 12 |
# File 'lib/greenpepper/example/executionresults.rb', line 10 def ignored @ignored end |
#successes ⇒ Object
Returns the value of attribute successes.
10 11 12 |
# File 'lib/greenpepper/example/executionresults.rb', line 10 def successes @successes end |
Class Method Details
.get_all_results(results_array) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/greenpepper/example/executionresults.rb', line 35 def self.get_all_results(results_array) results = HtmlTableExecutionResults.new results_array.each{ |result| results.successes += result.successes results.failures += result.failures results.errors += result.errors results.ignored += result.ignored } results end |
Instance Method Details
#add_error ⇒ Object
27 28 29 |
# File 'lib/greenpepper/example/executionresults.rb', line 27 def add_error @errors += 1 end |
#add_failure ⇒ Object
23 24 25 |
# File 'lib/greenpepper/example/executionresults.rb', line 23 def add_failure @failures += 1 end |
#add_ignore ⇒ Object
31 32 33 |
# File 'lib/greenpepper/example/executionresults.rb', line 31 def add_ignore @ignored += 1 end |
#add_success ⇒ Object
19 20 21 |
# File 'lib/greenpepper/example/executionresults.rb', line 19 def add_success @successes += 1 end |