Class: RSpec::Queue::QueueReporter

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/rspec/queue.rb

Instance Method Summary collapse

Constructor Details

#initialize(reporter, queue, example) ⇒ QueueReporter

Returns a new instance of QueueReporter.



313
314
315
316
317
# File 'lib/rspec/queue.rb', line 313

def initialize(reporter, queue, example)
  @queue = queue
  @example = example
  super(reporter)
end

Instance Method Details

#acknowledgeObject



338
339
340
# File 'lib/rspec/queue.rb', line 338

def acknowledge
  @queue.acknowledge(@example)
end

#cancel_run!Object



331
332
333
334
335
336
# File 'lib/rspec/queue.rb', line 331

def cancel_run!
  # Remove the requeued example from the list of examples ran
  # Otherwise some formatters might break because the example state is reset
  examples.pop
  nil
end

#report_failure!Object



323
324
325
# File 'lib/rspec/queue.rb', line 323

def report_failure!
  @queue.report_failure!
end

#report_success!Object



319
320
321
# File 'lib/rspec/queue.rb', line 319

def report_success!
  @queue.report_success!
end

#requeueObject



327
328
329
# File 'lib/rspec/queue.rb', line 327

def requeue
  @queue.requeue(@example)
end