Class: RRRSpec::Client::SlaveRunner::RedisReportingFormatter
- Inherits:
-
Object
- Object
- RRRSpec::Client::SlaveRunner::RedisReportingFormatter
- Defined in:
- lib/rrrspec/client/slave_runner.rb
Instance Attribute Summary collapse
-
#failed ⇒ Object
readonly
Returns the value of attribute failed.
-
#passed ⇒ Object
readonly
Returns the value of attribute passed.
-
#pending ⇒ Object
readonly
Returns the value of attribute pending.
Instance Method Summary collapse
- #example_failed(example) ⇒ Object
- #example_passed(example) ⇒ Object
- #example_pending(example) ⇒ Object
-
#initialize ⇒ RedisReportingFormatter
constructor
A new instance of RedisReportingFormatter.
- #status ⇒ Object
Constructor Details
#initialize ⇒ RedisReportingFormatter
Returns a new instance of RedisReportingFormatter.
92 93 94 95 96 97 |
# File 'lib/rrrspec/client/slave_runner.rb', line 92 def initialize @passed = 0 @pending = 0 @failed = 0 @timeout = false end |
Instance Attribute Details
#failed ⇒ Object (readonly)
Returns the value of attribute failed.
90 91 92 |
# File 'lib/rrrspec/client/slave_runner.rb', line 90 def failed @failed end |
#passed ⇒ Object (readonly)
Returns the value of attribute passed.
90 91 92 |
# File 'lib/rrrspec/client/slave_runner.rb', line 90 def passed @passed end |
#pending ⇒ Object (readonly)
Returns the value of attribute pending.
90 91 92 |
# File 'lib/rrrspec/client/slave_runner.rb', line 90 def pending @pending end |
Instance Method Details
#example_failed(example) ⇒ Object
107 108 109 110 111 112 |
# File 'lib/rrrspec/client/slave_runner.rb', line 107 def example_failed(example) @failed += 1 if example.exception.is_a?(SoftTimeoutException) @timeout = true end end |
#example_passed(example) ⇒ Object
99 100 101 |
# File 'lib/rrrspec/client/slave_runner.rb', line 99 def example_passed(example) @passed += 1 end |
#example_pending(example) ⇒ Object
103 104 105 |
# File 'lib/rrrspec/client/slave_runner.rb', line 103 def example_pending(example) @pending += 1 end |
#status ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/rrrspec/client/slave_runner.rb', line 114 def status if @timeout 'timeout' elsif @failed != 0 'failed' elsif @pending != 0 'pending' else 'passed' end end |