Module: RRRSpec::Client::SlaveRunner::RedisReportingFormatter::ClassMethods

Included in:
RRRSpec::Client::SlaveRunner::RedisReportingFormatter
Defined in:
lib/rrrspec/client/slave_runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#failedObject (readonly)

Returns the value of attribute failed.



114
115
116
# File 'lib/rrrspec/client/slave_runner.rb', line 114

def failed
  @failed
end

#passedObject (readonly)

Returns the value of attribute passed.



114
115
116
# File 'lib/rrrspec/client/slave_runner.rb', line 114

def passed
  @passed
end

#pendingObject (readonly)

Returns the value of attribute pending.



114
115
116
# File 'lib/rrrspec/client/slave_runner.rb', line 114

def pending
  @pending
end

Instance Method Details

#example_failed(notification) ⇒ Object



131
132
133
134
135
136
# File 'lib/rrrspec/client/slave_runner.rb', line 131

def example_failed(notification)
  @failed += 1
  if notification.exception.is_a?(SoftTimeoutException)
    @timeout = true
  end
end

#example_passedObject



123
124
125
# File 'lib/rrrspec/client/slave_runner.rb', line 123

def example_passed
  @passed += 1
end

#example_pendingObject



127
128
129
# File 'lib/rrrspec/client/slave_runner.rb', line 127

def example_pending
  @pending += 1
end

#resetObject



116
117
118
119
120
121
# File 'lib/rrrspec/client/slave_runner.rb', line 116

def reset
  @passed = 0
  @pending = 0
  @failed = 0
  @timeout = false
end

#statusObject



138
139
140
141
142
143
144
145
146
147
148
# File 'lib/rrrspec/client/slave_runner.rb', line 138

def status
  if @timeout
    'timeout'
  elsif @failed != 0
    'failed'
  elsif @pending != 0
    'pending'
  else
    'passed'
  end
end