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.



298
299
300
301
302
# File 'lib/rspec/queue.rb', line 298

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

Instance Method Details

#acknowledgeObject



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

def acknowledge
  @queue.acknowledge(@example)
end

#cancel_run!Object



308
309
310
311
312
313
# File 'lib/rspec/queue.rb', line 308

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

#requeueObject



304
305
306
# File 'lib/rspec/queue.rb', line 304

def requeue
  @queue.requeue(@example)
end