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.



406
407
408
409
410
# File 'lib/rspec/queue.rb', line 406

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

Instance Method Details

#acknowledgeObject



431
432
433
# File 'lib/rspec/queue.rb', line 431

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

#cancel_run!Object



424
425
426
427
428
429
# File 'lib/rspec/queue.rb', line 424

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



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

def report_failure!
  @queue.report_failure!
end

#report_success!Object



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

def report_success!
  @queue.report_success!
end

#requeueObject



420
421
422
# File 'lib/rspec/queue.rb', line 420

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