Class: Test::Unit::AutoRunner::GCStressListener

Inherits:
Object
  • Object
show all
Defined in:
lib/test/unit/autorunner.rb

Instance Method Summary collapse

Instance Method Details

#attach_to_mediator(mediator) ⇒ Object



624
625
626
627
628
629
630
631
632
633
634
# File 'lib/test/unit/autorunner.rb', line 624

def attach_to_mediator(mediator)
  mediator.add_listener(TestCase::STARTED) do |test|
    GC.start
    GC.stress = true
  end

  mediator.add_listener(TestCase::FINISHED) do |test|
    GC.start
    GC.stress = false
  end
end