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

#errors_outside_of_examples_count ⇒ Object (readonly)

Returns the value of attribute errors_outside_of_examples_count.



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

def errors_outside_of_examples_count
  @errors_outside_of_examples_count
end

#failed ⇒ Object (readonly)

Returns the value of attribute failed.



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

def failed
  @failed
end

#passed ⇒ Object (readonly)

Returns the value of attribute passed.



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

def passed
  @passed
end

#pending ⇒ Object (readonly)

Returns the value of attribute pending.



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

def pending
  @pending
end

Instance Method Details

#dump_summary(notification) ⇒ Object



143
144
145
# File 'lib/rrrspec/client/slave_runner.rb', line 143

def dump_summary(notification)
  @errors_outside_of_examples_count = notification.errors_outside_of_examples_count
end

#example_failed(notification) ⇒ Object



136
137
138
139
140
141
# File 'lib/rrrspec/client/slave_runner.rb', line 136

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

#example_passed ⇒ Object



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

def example_passed
  @passed += 1
end

#example_pending ⇒ Object



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

def example_pending
  @pending += 1
end

#reset ⇒ Object



120
121
122
123
124
125
126
# File 'lib/rrrspec/client/slave_runner.rb', line 120

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

#status ⇒ Object



147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/rrrspec/client/slave_runner.rb', line 147

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