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.



403
404
405
406
407
# File 'lib/rspec/queue.rb', line 403

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

Instance Method Details

#acknowledgeObject



428
429
430
# File 'lib/rspec/queue.rb', line 428

def acknowledge
  @queue.acknowledge(@example.queue_entry)
end

#cancel_run!Object



421
422
423
424
425
426
# File 'lib/rspec/queue.rb', line 421

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



413
414
415
# File 'lib/rspec/queue.rb', line 413

def report_failure!
  @queue.report_failure!
end

#report_success!Object



409
410
411
# File 'lib/rspec/queue.rb', line 409

def report_success!
  @queue.report_success!
end

#requeueObject



417
418
419
# File 'lib/rspec/queue.rb', line 417

def requeue
  @queue.requeue(@example.queue_entry)
end